Apr 23 2014 
Support Center » Knowledgebase » Linux VPS » How do I install GMP on my VPS?
 How do I install GMP on my VPS?
Solution We have had a few clients enquire about GMP. The install of apache/php that comes with cpanel does not have GMP enabled and cpanel itself does not support the compilation of GMP into PHP.

You can however manually install GMP and re-compile PHP with GMP enabled.

You can download the GMP library from http://www.swox.com/gmp/. This site also has the GMP manual available.

We do not support or carry out GMP installation as it means that every time apache/php needs upgrading you would always have to manually recompile PHP. You would also no longer be able to rely upon the 'rebuild apache' utility in WHM. Anytime you need to upgrade/recompile PHP you would have to do it manually to add GMP support.

To recomppile php with GMP support you need to do the following:

1. Login to shell as root and issue these commands:
cd /home/cpapachebuild/buildapache/php-4.3.8
rm /home/cpapachebuild/buildapache/config.cache
php -i | grep ./configure
2. Now cut and paste that to a text file so you can add the GMP part. The final configure command should look something like this:

./configure '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--enable-magic-quotes' '--with-mysql=/usr' '--enable-discard-path' '--with-pear' '--enable-sockets' '--enable-track-vars' '--enable-versioning' '--with-zlib' '--with-gmp'

**do not use the above use your own as the above will not work it's just an example**
3. Now type: ./configure --with-gmp ......etc....etc.... (the configure line above)
4. Run the following command:
5. Run the following command:
make install
6. Finally restart Apache
service httpd restart

Article Details
Article ID: 83
Created On: Jan 23 2009 04:05 PM

 This answer was helpful  This answer was not helpful

 Login [Lost Password] 
Remember Me:
 Article Options
Home | Register | Knowledgebase

Help Desk Software By Kayako eSupport v3.60.02