When calling a gmp math function like gmp_mod
, I get:
Fatal error: Call to undefined function gmp_mod()
I have installed the php5-gmp
package and restarted the web-server, and the function is still undefined. The server is running Ubuntu 10.04 and PHP is running as an Apache module. All software was installed from official packages.
How do I enable the GMP math functions in PHP? I'm looking for a solution that uses official packages, not compiling from source.
Here is the way which worked for me :
apt-get install php5-gmp
extension=php_gmp.so
to php.iniEt voilà !
phpinfo() sample :
It works fine here (Debian), so I suppose it will be ok for Ubuntu too.