Home > Backend Development > PHP Tutorial > apache - YOSEMITE 10.10.2 自带的PHP无法被brew安装的所替代?

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

WBOY
Release: 2016-06-06 20:34:42
Original
1026 people have browsed it

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

<code>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
</code>
Copy after login
Copy after login

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

回复内容:

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

<code>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
</code>
Copy after login
Copy after login

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

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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template