Thursday, September 2, 2010

How to manually recompile php on cpanel server?

Guys,

I referred following steps :

========
1. cd /home/cpeasyapache/src/php-5.2.9/
2. ./configure --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --enable-libxml --enable-magic-quotes --enable-mbstring --enable-pdo=shared --enable-sockets --enable-zip --with-kerberos --prefix=/usr/local --with-apxs2=/usr/local/apache/bin/apxs --with-curl=/opt/curlssl/ --with-curlwrappers --with-freetype-dir=/usr --with-gd --with-gettext --with-imap=/opt/php_with_imap_client/ --with-imap-ssl=/usr --with-jpeg-dir=/usr --with-libdir=lib64 --with-libexpat-dir=/usr --with-libxml-dir=/opt/xml2/ --with-mcrypt=/opt/libmcrypt/ --with-mime-magic --with-mysql=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-openssl=/usr --with-openssl-dir=/usr --with-pcre-regex=/opt/pcre --with-pdo-mysql=shared --with-pdo-sqlite=shared --with-pic --with-png-dir=/usr --with-sqlite=shared --with-ttf --with-xmlrpc --with-xpm-dir=/usr --with-zlib --with-zlib-dir=/usr

Note : You can get these options from info.php or php -i|grep configure (here you have to remove '' syntax)

3. make
4. make install
5. /etc/init.d/httpd restart

Note : You can do like : CUSTOM_PHP_FLAGS="--with-xsl" /scripts/easyapache //I didn't try it since one of my friend got error here.
=========

That's it. Try :)

No comments:

Post a Comment