Hi,
Please help to solve the following problem using gmp_mod(). I bring the function from PHP Manual, but it is not working. Please help.
Thanks in advance.PHP Code:<?php
$mod = gmp_mod("8", "3");
echo gmp_strval($mod) . "\n";
?>
Printable View
Hi,
Please help to solve the following problem using gmp_mod(). I bring the function from PHP Manual, but it is not working. Please help.
Thanks in advance.PHP Code:<?php
$mod = gmp_mod("8", "3");
echo gmp_strval($mod) . "\n";
?>
What does "not working" mean, exactly?
The GMP library is probably not compiled or enabled.
I am getting the following error.
Fatal error: Call to undefined function: gmp_mod() in /home/go/public_html/test/mod.php on line 3
Please help me to solve it out.
Many thanks.
It might be good to check if your version of php was built with GMP support.
Create a page to check:
Visit this page -- do you see a section like this:Code:phpinfo();
]Code:gmp
gmp support enabled
or at least, under the Configure Command section, the text '--with-gmp' ?
Thanks sunburnt,
No, I am not getting anything from phpinfo();
Please tell me how to cope it up.
Waiting for the reply.
Thanks.
If you are using windows you need to go to your php.ini and enable the line: extension = gmp.dll.
If you are using Linux, you need to recompile PHP with --with-gmp or compile and enable the gmp.so.
See: http://us3.php.net/gmp
I found this line
;extension=php_gmp.dll
in php.ini file and I make it like this
;enabled extension=php_gmp.dll
But my program is not working. Please help.
To enable it you need to remove the ";" from thje beginning of the line. No need to type enabled. :)
I have done accrodingly, but still getting the same error,
Fatal error: Call to undefined function: gmp_mod() in /home/go/public_html/test/mod.php on line 3
Please help.
Check your extension path and check that directory contains the php_gmp.dll file.
directory path:
C:\Program Files\LuckaSoft\EnginSite Editor for PHP\php\PHP-5.2.3\ext
Please help.
Well does php_gmp.dll exist?
Yes it exists. Please help.
Does the extension path setting in PHP point to the directory in which it exists?
What is the extension path setting in PHP and how to observe it. Please help.
The setting is in the php.ini:
http://de3.php.net/manual/en/ini.cor....extension-dir
It is called extension_dir and it needs to be set to either an absolute path i.e: one starting with C:\ or a path relative to the PHP.ini.