Phpbrew on ubuntu – how to change version?

2019-05-31 08:56发布

问题:

I have Ubuntu 12.04 LTS "precise", php 5.3.10 (from apt-get), fresh phpbrew 1.17.2, and php 5.4.35 installed with phpbrew. But it works only for cli.

$ php -v # 5.3.10-1ubuntu3.11
$ phpbrew install 5.4.35 +default +fpm
$ phpbrew switch 5.4.35
$ nginx -s reload
$ service php5-fpm restart
$ php -v // PHP 5.4.35
$ curl -IL example.com | grep Powered # still 5.3.10-1ubuntu3.11 ! Why?

Than i've tried new fpm from brew bind into another pid /var/run/php54-fpm.pid and reconfigure some servers for fastcgi_pass unix:/var/run/php54-fpm.pid;. $ phpbrew fpm start works correclty, but example page with phpinfo(); returns 5.3 version.

How to really switch php version in this case?

Thanks in advance!

回答1:

This Issue is explained here:

https://github.com/phpbrew/phpbrew/issues/226

Basically you have to link the php *.so files within your apache config by hand.