PHP has a problem connecting multiple PHP in Apache, how to switch multiple PHP version? My machine has a apache2.2.22, but there are two php,5.3.10 and 5.4.3,5.3.10 are Mac OS X, there are some configuration is not what I want, so I want to switch to 5.4.3 above, but there seems to be only one libphp5.so file. Ask a friend, friend said, modify this libphp5.so can solve, is this? Add Comment sharing1 Approval objection, will not show your nameWjj, development engineer1 People agreeI also have a number of local versions, my local PHP is installed in the OSX system using homebrew, I have two versions:
php5.4 and php5.6
My default version before is php5.4, if you want to migrate from Shell and Apache to php5.6 at the same time:
1. First you need to install php5.6 through brew, very simple:
Brew Install PHP56
(Of course, you have to unlink out your old version of php5.4 first)
2. After installing the php5.6, you will find that the PHP version of the local shell has been change, but Apache default phpinfo print out the version is still php5.4, to view your Apache configuration file, my local is:
/etc/apache2/http.conf
There will be support for the path of the libphp5.so, and here I am:
Libexec/apache2/libphp5.so
The actual location of this directory is:
/usr/libexec/apache2/libphp5.so
When you install php56 through brew, a new version of libphp5.so has been generated, here:
/usr/local/cellar/php56/5.6.17/libexec/apache2/libphp5.so
And I directly renamed the original libphp5.so, created a soft chain to/usr/local/cellar/php56/5.6.17/libexec/apache2/libphp5.so just fine:-)
Now restart Apache, refresh the phpinfo look, I believe you must switch to the new version.
When Apache is connected to multiple PHP, how to switch multiple PHP versions?