Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple PHP version with Apache on CentOS 7

Can anyone here instruct me way to install and configure Multi PhP with one apache instance on CentOS 7, and the proper way to test it..

like image 219
Tabish Avatar asked Apr 24 '18 14:04

Tabish


People also ask

Can I have 2 versions of PHP installed?

Add a PHP Repository So you'll need to add the PHP repository in your system to install the multiple PHP versions. Once the repository is up-to-date, you can proceed to install multiple PHP versions.

Can I run several version of PHP at the same time?

Yes we can run several versions of php. To do that we must have to check the INSTALL file, if it is included in PHP source distribution.


1 Answers

As explained by @runwuf, this is possible using the sofware collections available in centos-scl repository or in remi repository.

But using SetHandler to fastcgi proxy seems a better and more modern way, thanks to httpd 2.4:

SetHandler "proxy:fcgi://127.0.0.1:9000"

This is explained in some blog posts:

  • My PHP Workstation on Remi's blog
  • PHP Configuration Tips on RH developpers' blog
like image 65
Remi Collet Avatar answered Oct 01 '22 00:10

Remi Collet