Admin-Ahead Community

Linux => Control Panels => cPanel => Topic started by: akhils on October 10, 2014, 05:08:29 pm

Title: How to Easy PHP4+PHP5 side by side
Post by: akhils on October 10, 2014, 05:08:29 pm
Hey Everyone,

Please follow the steps to have PHP4 and PHP5 running side by side after the removal of php4 from EasyApache. This is unofficial of course, follow this "how to" at your own risk.

This "how to" will walk you through building PHP4 and PHP5 through EasyApache with PHP4 (*.php4) running as CGI and (*.php) PHP5 running as DSO.

PHP4 is no longer supported. I suggest you don't 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, please complete the following steps:
-----
1. Download the PHP 4 custom module for EasyApache
wget http://docs.cpanel.net/twiki/pub/EasyApache3/CustomMods/custom_opt_mod-PHP449.tar.gz

2. Extract the tarball
tar -C /var/cpanel/easy/apache/custom_opt_mods -zxvf custom_opt_mod-PHP449.tar.gz

3. Go to EasyApache and enable the PHP4.4.9 support module in the short options list.

4. Build your EasyApache profile as you normally would (this will build apache, php4, and php5)

5. After the build, you will have the php4 binary in your /usr/bin. Confirm it is working
php4 -v

6. Also, verify your PHP5 is still working
php -v

7. Configure apache to run both versions of php***
/usr/local/cpanel/bin/rebuild_phpconf 5 cgi dso 1
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

That's it, you will be having PHP4+PHP5 side by side after this configuration setup.
----------
Best Regards,

Akhil Sambasivan,
System Engineer,
Admin-Ahead Server Technologies.
https://www.admin-ahead.com