php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15454 GMP problems with php 4.1.1
Submitted: 2002-02-08 10:48 UTC Modified: 2002-02-10 18:16 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: sama at inf dot ufsc dot br Assigned:
Status: Closed Package: Math related
PHP Version: 4.1.1 OS: Linux Red Hat 7.2
Private report: No CVE-ID: None
 [2002-02-08 10:48 UTC] sama at inf dot ufsc dot br
Hi,

     I'm tried to use gmp on php 4.1.1 but, when I added a big number on the gmp_init function, the function retuned me zero. So, I return back to 4.0.6 and the gmp_init fuction returned the correct number. 
      I think there is something wrong with gmp on php 4.1.1.
  
         Roberto Samarone Araujo

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-09 04:41 UTC] sander@php.net
Can you post your configure line, and a self-contained sample script?
 [2002-02-10 13:10 UTC] sama at inf dot ufsc dot br
You can use a simple code like this :

$x = gmp_init("0x00d2d025ec7e1dbb6d778a52394c988594c57b47d7327a3e676d3a5ca7a5af87c4153c80994cf781f6a9d4a2f0e66d04baffb0059853a8937a895f6d17e76950e1");

printf("%s",gmp_strval($x));

If you put " between the big number on gmp_init function, it doesn't show the value on printf function but, if you remove ", you can see that or it doesn't shows the correct value or it shows zero.

On my configure line, I added --with-gmp and it compiled all right. 
 [2002-02-10 18:16 UTC] elixer@php.net
This bug has been fixed in CVS.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC