How To Use PHP 4.4.9 (FastCGI) With Apache & ISPConfig 3 (Debian Wheezy)
Author: Falko Timme <ft [at] falkotimme [dot]
com> Follow me on Twitter
Last edited 06/18/2013
Since ISPConfig 3.0.5, it is possible to use multiple PHP versions on one server and select the optimal PHP version for a website. If you have some very old websites on your server, they might not work with PHP5, but only with PHP4. This tutorial shows how to build PHP 4.4.9 as a FastCGI version for use with Apache2 on a Debian Wheezy server. This PHP version can be used together with the default PHP (installed through apt) in ISPConfig.
I do not issue any guarantee that this will work for you!
1 Preliminary Note
PHP-FPM is not available for PHP4, therefore I just describe how to build a FastCGI version of PHP4. FastCGI is available only for Apache servers, therefore you cannot use it with nginx..
2 Building PHP 4.4.9 (FastCGI)
Install the prerequisites for building from source code:
apt-get install build-essential
PHP 4.4.9 will not compile with modern OpenSSL versions, therefore we need to install an older OpenSSL version (0.9.8x) first:
tar xvfz openssl-0.9.8x.tar.gz
Download and extract PHP 4.4.9:
wget http://de.php.net/get/php-4.4.9.tar.bz2/from/this/mirror -O php-4.4.9.tar.bz2
tar jxf php-4.4.9.tar.bz2
That's it - we will now add the APC module to our PHP 4.4.9 installation:
tar xvfz APC-3.0.19.tgz
./configure --enable-apc --enable-apc-mmap --with-php-config=/opt/phpfcgi-4.4.9/bin/php-config
Afterwards, open /opt/phpfcgi-4.4.9/lib/php.ini...
... and set extension_dir = "/opt/phpfcgi-4.4.9/lib/php/extensions/no-debug-non-zts-20020429" and add the line extension=apc.so at the end of the file (you can also configure some additional APC settings):
In ISPConfig 3.0.5, you can configure the new PHP version under System > Additional PHP Versions. On the Name tab, you just fill in a name for the PHP version (e.g. PHP 4.4.9) - this PHP version will be listed under this name in the website settings in ISPConfig:
Go to the FastCGI Settings tab (the PHP-FPM Settings tab can be left empty) and fill out the fields as follows:
If everything is working as expected, you can now choose PHP 4.4.9 for a website in ISPConfig. You can check the PHP version of a website by creating a PHP file with the phpinfo(); function in it and calling that file in your browser:
Falko Timme is the owner of Timme Hosting (ultra-fast nginx web hosting). He is the lead maintainer of HowtoForge (since 2005) and one of the core developers of ISPConfig (since 2000). He has also contributed to the O'Reilly book "Linux System Administration".