Want PHP4 and PHP5 running in the same cPanel server ?
Kindly keep in mind, PHP4 is no longer supported (1st released in 2000) Not preferred to do this unless you absolutely need it. Since it’s not supported anymore, it could leave your server more vulnerable than it would be without it.
To install, do the following steps:
* Download the PHP4 custom module for EasyApache from,
* Extract the tarball to the folder, /var/cpanel/easy/apache/cusom_opt_mods
# tar -C /var/cpanel/easy/apache/custom_opt_mods -zxvf custom_opt_mod-PHP449.tar.gz
* Run EasyApache ( from WHM or
# /scripts/easyapache )
* Enable the PHP4.4.9 support module in the short options list.
* Complete the steps of EasyApache
* Verify both PHP versions are present
# php4 -v & # php -v
* Configure apache to run both versions of php***
# /usr/local/cpanel/bin/rebuild_phpconf 5 cgi dso 1
(The syntax is rebuild_phpconf <Default PHP Major Version> <PHP4 Handler> <PHP5 Handler> <Suexec>)
–> So in the above case, php5 is default PHP Major version
CGI is PHP4 handler and DSO is PHP5 handler and suexec is enabled.
* If the PHP4 script requires the extension to be .php instead of .php4, you can set the handler for the one site using a .htaccess with the following contents:
AddType application/x-httpd-php4 .php