PDA

View Full Version : How to install PHP function "GMP" on WHM/cPanel server?



Fli
04-23-2015, 07:40 PM
How to install that GMP function?

i did it like this:

cd /usr/local/src
wget http://ftp.sunet.se/pub/gnu/gmp/gmp-5.1.0a.tar.bz2
tar -xjvf gmp-5.1.0a.tar.bz2
cd gmp-5.1.0
./configure
make
make check
make install

then editted file:
vi /var/cpanel/easy/apache/rawopts/all_php5

and added this to the new line:
--with-gmp

so the resulting file is in my case:
--enable-unicode-properties
--with-gmp

then started EasyApache build from within Screen window:

screen

then:
/scripts/easyapache --build

after it completed, i see GMP works.

I have this in test PHP script:
<?php phpinfo(); ?>

and new section appeared when opened that script in web browser:

gmp



gmp support
enabled


GMP version
4.3.1