How To Use Multiple PHP Versions (PHP-FPM & FastCGI) With ISPConfig 3 (CentOS 6.3) - Page 2
3 Building PHP 5.3.22 (FastCGI)
Download and extract PHP 5.3.22:
Install the prerequisites for building PHP5:
yum groupinstall 'Development Tools'
yum install libxml2-devel libXpm-devel gmp-devel libicu-devel t1lib-devel aspell-devel openssl-devel bzip2-devel libcurl-devel libjpeg-devel libvpx-devel libpng-devel freetype-devel readline-devel libtidy-devel libxslt-devel libmcrypt-devel pcre-devel curl-devel mysql-devel ncurses-devel gettext-devel net-snmp-devel libevent-devel libtool-ltdl-devel libc-client-devel postgresql-devel
Configure and build PHP 5.3.22 as follows (you can adjust the ./configure command to your needs, take a look at
to see all available options; if you use a different ./configure command, it is possible that additional libraries are required, or the build process will fail):
The last switch (--enable-cgi) makes sure this PHP version will work with FastCGI.
Copy php.ini to the correct location:
cp /usr/local/src/php5-build/php-5.3.22/php.ini-production /opt/phpfcgi-5.3.22/lib/php.ini
That's it - if you like, you can now install some additional modules like APC, memcache, memcached, and ioncube.
The APC, memcache, and memcached modules can be installed through PEAR which we must install and initialize first:
yum install php-pear
pecl -C ./pear.conf update-channels
APC can now be installed as follows:
pecl -C ./pear.conf install apc
Accept all default values. Afterwards, open /opt/phpfcgi-5.3.22/lib/php.ini...
... and add the line extension=apc.so at the end of the file (you can also configure some additional APC settings):
The memcache extension can be installed as follows:
pecl -C ./pear.conf install memcache
... and add the line extension=memcache.so at the end of the file:
The memcached extension can be installed as follows:
yum install libmemcached-devel
pecl -C ./pear.conf install memcached
... and add the line extension=memcached.so at the end of the file:
The ionCube Loader can be installed as follows:
Next download and unpack the correct ionCube Loader package for your architecture (x86_64 or x86).
Proceed as follows:
cp ioncube/ioncube_loader_lin_5.3.so /opt/phpfcgi-5.3.22/lib/php/extensions/no-debug-non-zts-20090626/ioncube.so
Add the line zend_extension = /opt/phpfcgi-5.3.22/lib/php/extensions/no-debug-non-zts-20090626/ioncube.so right at the beginning of the file (before the [PHP] line):
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 5.3.22) - 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: