Vinay Aggarwal Vinay Aggarwal - 1 year ago 74
PHP Question

Tell apache to use a specific php version installed using phpbrew

I had installed php, mysql, apache stack for development. That installation is using configuration files from


Later i installed multiple php version using
. All versions are accessible and switchable from CLI. But apache always stays on default version that was not installed using phpbrew.

Here is a list of my installed php versions.

$ phpbrew list
Installed versions:
php-5.4.13 (/home/admin1/.phpbrew/php/php-5.4.13)
+default -- --with-bz2=/usr
php-5.5.5 (/home/admin1/.phpbrew/php/php-5.5.5)

php-5.3.27 (/home/admin1/.phpbrew/php/php-5.3.27)

I have tried changing confugration file paths so they point to phpbrew's php. But nothing seems to be working.

How can i tell apache to use phpbrew's php version ?

c9s c9s
Answer Source

You need to build a php with apxs2, then you should see the built module file in your apache configuration file.

phpbrew install 5.4.22 +apxs2=/usr/bin/apxs2