YOSEMITE 10.10.2 自带的PHP无法被brew安装的所替代?


我的安装方法(主要参考了: http://www.cnblogs.com/xiangmin/p/4279627.html


 brew options php56 && brew install php56  
echo 'export PATH="$(brew --prefix homebrew/php/php56)/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
brew install php56-xdebug php56-mcrypt php56-imagick   
sudo apachectl restart

打开浏览器,进入 http://localhost/phpinfo.php , 发现依然无法替代yosemite自带的PHP 5.5.14

homebrew apache php osx mac

蒼炎的軌迹 10 years, 4 months ago

修改apache的配置httpd.conf,将LoadModule php5_module libexec/apache2/libphp5.so修改成泥新生成的so,比如:LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so。然后重启apache

gfgf5zc answered 10 years, 4 months ago

Your Answer