Comments on How To Use Multiple PHP Versions (PHP-FPM & FastCGI) With ISPConfig 3 (CentOS 6.3)

How To Use Multiple PHP Versions (PHP-FPM & FastCGI) With ISPConfig 3 (CentOS 6.3) 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. This feature works with PHP-FPM (starting with PHP 5.3) and FastCGI (all PHP 5.x versions). This tutorial shows how to build PHP 5.3 and PHP 5.4 as a PHP-FPM and a FastCGI version on a CentOS 6.3 server. These PHP versions can be used together with the default PHP (installed through yum) in ISPConfig.

15 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Anonymous

http://www.lifelinux.com/error-compiling-php-on-centos-x64/

By: BTDT

I did

./configure ----enable-fpm --with-fpm-user=apache --with-fpm-group=apache

then make & make install.

But with the following command the system cant find the file php.ini-production

cp /usr/local/src/php5-build/php-5.3.22/php.ini-production /opt/php-5.3.22/lib/php.ini

 

what i'm doing wrong. Sorry i'm new to this.

 Thanks

By: denuxer

add --prefix=/opt/php-5.3.22 

while you ./configure

By: Matt Janssen

This was perfect for helping me install PHP 5.3 alongside PHP 5.5 (Remi) for testing on Nginx PHP-FPM. I knew there was a way to run multiple PHP versions on CentOS 6.5, but I wasn't sure what the build commands where. I ended up using PHP 5.3.29. I also used /opt/php-5.3.29/var/run/php5-fpm.sock UNIX socket instead of the port listening. Thanks!!!

By: otx

Hi,

Obviously, you did not tested this tutorial on Centos 6. There is no libc-client.a on Centos 6.6, so php won't build with the presented configure options. if you want this tutorial to give the expected results, you should also include the solution to build a prober imap library.

By: Michael

The Startscript doesnt work with Centos 7.0.  In CentOS/RHEL 7, the init scripts have been replaced with service units. Does any body know how to install an second php version or how to configure the start scripts?

By: surdet

Thank you for a nice tutorial. I starting from with a topic "5 Building PHP 5.4.12(FastCGI)" but I use php 5.4.42 instead. I struck on a step #pecl -C ./pear.conf install memcached. I have got an error "configure: error: no, libmemcached sasl support is not enabled.". please give me an advice.

Thanks again.

 

By: Touchstone

This is what I found that worked for me.  If you don't need SASL, answer with this:

libmemcached directory [no] : no --disable-memcached-sasl

By: Edie

Thanks for your work.

By: craigfanman

If anyone else did this and found php couldnt connect to mysql, check this in your php.ini:

mysqli.default_socket = /var/lib/mysql/mysql.sock

 

By: ahmet polat

for 5.2.17

add configure --enable-fastcgi

 

By: fbarcenas

Lets update this build for PHP 7 and CENTOS 7 please.

By: Milance

Please update for php 7.0, 7.1, 7.2

By: Jesus

Please Could be very helpful and great to update php 5.6, 7.0, 7.1, 7.2 for centos 7.x. anyway thanks

By: gacuxz

There is more recent tutorial which helped me to install php-7.4.5 alongside php-5.4.45. The problem was that new version of php had one more config file:

cp /opt/php-7.1/etc/php-fpm.d/www.conf.default /opt/php-7.1/etc/php-fpm.d/www.conf