How to install/enable GMP (math functions) for PHP on Ubuntu?

Here is the way which worked for me :

  1. Installed GMP with apt-get install php5-gmp
  2. Added extension=php_gmp.so to php.ini

Et voilĂ  !

phpinfo() sample :

gmp
gmp support     enabled
GMP version     4.3.2 

It works fine here (Debian), so I suppose it will be ok for Ubuntu too.

Leave a Comment