(with MUCH respect to 'rustelekom' on the Cpanel Forums!)
If like myself you've had enormous difficulty in upgrading to PHP 5.1.4, and have possibly ended up with a broken installation, try this -- it has worked for me:
1. First, run /scripts/easyapache with option 1 to get PHP 4.4.2 working again.
2. When this is finished: cd /home/cpapachebuild/buildapache
3. rm -rf php-4.4.2.tar.gz folder
4. get the php-5.1.4.tar.gz install file, and place in this directory
5. tar -xzf php-5.1.4.tar.gz
6. cd php-5.1.4 folder
7. Run configure -- the following string has created a working install for me, it may be worth noting that 'rustelekom' has advised to avoid mysqli and versioning:
./configure --with-apxs=/usr/local/apache/bin/apxs --prefix=/usr/local --with-xml --enable-bcmath --enable-calendar --with-curl --with-dom --with-dom-xslt --with-dom-exslt --enable-ftp --with-gd --with-xpm-dir=/usr/X11R6 --with-mcrypt --with-mhash --enable-magic-quotes --with-mysql=/usr --enable-discard-path --with-pear --enable-sockets --enable-track-vars --with-ttf --with-freetype-dir=/usr --enable-gd-native-ttf --with-xmlrpc --with-zlib
8. make
9. make install
10. Check your httpd.conf file (pico -w /etc/httpd/conf/httpd.conf) to be certain the following lines are present in the appropriate places, and similar references to php4 are commented out or removed:
LoadModule php5_module libexec/libphp5.so
AddModule mod_php5.c
11. Restart httpd, either at the command line or via WHM
(WHM > Restart Services > HTTP Server (Apache)
12. Just to be safe, upload a page with <?php phpinfo() ?> and check. Note that in Firefox, you may need to delete cache and history in order to see accurate info.
13. No matter what happens, /scripts/easyapache with option 1 should get you back to a working 4.4.2 install, should anything go wrong. Also, if you need to change the configure string, be
certain to run 'make clean' before you do ./configure again.
After nearly 36 hrs of struggling, I can hardly believe it works. . .
It is now officially JAMESON time
