• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Recompiling cPanel/WHM's Internel PHP

BrandonTheG

CEO
NLC
Hello,

I was wondering if it was possible to recompile cPanel/WHM's internal PHP. I am looking to make some custom scripts for my WHM, and it needs a few more PHP extensions to do so. I am also looking to compile in mysqli support so I can switch to having phpMyAdmin to use mysqli.

I was looking at the cPanel/WHM's internal phpinfo.php page, it seems to be PHP 5.2.3. I tried phpize'in the extensions, but that didn't seem to work as they won't load.

Would basing a configure statement off this going to work?

Code:
./configure --enable-static --with-ldap=/usr/local/cpanel/3rdparty --with-iconv --enable-mbstring --with-mbstring=all --enable-mbstr-enc-trans --with-gd --with-dom --enable-mbregex --with-zlib --with-jpeg --with-png --with-imap=../../bsd/imap --enable-ftp --with-gettext --with-xml --enable-track-vars --enable-sockets --with-mysql=/usr --with-pgsql --with-config-file-path=/usr/local/cpanel/3rdparty/etc --prefix=/usr/local/cpanel/3rdparty

Thanks for looking at this too.
 
If that's what php was configured with by whm, then yeah that'll work ...

When u phpize'd the extension sources did you just type phpize ??

There are more parameters you should pass such as --with-php-config=/path/to/cPanels/php-config and some extension specific parameters also ... use full paths to everything, there's no reason it shouldn't work if the build environment for cPanel's php is left intact ( which I suspect it is ) ...
 
Back
Top