Top 5 Linux Distros for Web Hosting
Linux has become the preferred operating system for web hosting because it offers strong security,…

PHP 5.2 has become outdated and 5.3 is officially mentioned as “End of Life” status. But many applications and custom scripts still work on these two platforms. So here is the guide for people who wish to use PHP 5.2 or 5.3 along with PHP 5.4 or 5.5 on a cPanel server and make use of both versions at the same time.
Let’s assume the latest version of PHP 5.4 is installed on your server by default. But for some reason, you need to install an older version; follow the below steps to install an old version of PHP.
# mkdir /usr/local/buildphp53 # cd /usr/local/buildphp53 # wget http://museum.php.net/php5/php-5.3.9.tar.gz # tar --strip-components=1 -zxvf php-5.3.*
#./configure --prefix=/usr/local/php53 --enable-cgi --enable-bcmath --enable-calendar --with-mysql=/usr/bin -with-libdir=lib64 --with-gd --enable-mbstring (you can add more modules per your wish) # make # make install
# pico /usr/local/apache/conf/includes/pre_virtualhost_global.conf
Add the following:
Action application/x-httpd-php53 /cgi-sys/php53 AddType application/x-httpd-php53 .php53
# /usr/local/cpanel/bin/apache_conf_distiller --update # touch /var/cpanel/easy_skip_update_php_mime_types
# pico /usr/local/cpanel/cgi-sys/php53
And add the following to it
#!/bin/sh exec /usr/local/php53/bin/php-cgi
# chown root:wheel /usr/local/cpanel/cgi-sys/php53 # chmod +x /usr/local/cpanel/cgi-sys/php53
# cp /usr/local/buildphp53/php.ini-production/usr/local/php53/lib/php.ini
# ln -s /usr/local/php52/bin/php-cgi /usr/local/bin/php53
# service httpd restart
AddHandler application/x-httpd-php53.php
That’s it. Create a phpinfo page inside the folder and browse it to see if PHP 5.3 is in effect for that folder.
Things to note is: If you want to install OR compile a module with PHP 5.3, use the appropriate php-config and phpize file, i.e.
phpize: /usr/local/php53/bin/phpize php-config: ./configure --with-php-config=/usr/local/php53/bin/php-config
Explore more hosting insights, tips and industry updates.
Linux has become the preferred operating system for web hosting because it offers strong security,…
Unable to receive/send e-mails – For incoming mail server –Tool>Accounts>Mail>Properties>Servers The incoming mail server(POP3) should…
When your server is functioning properly but is now unable to manage a request, it…