php_osx已安装php 7,phpinfo()和作曲家仍然认为其php5.5 [英] php_osx installed php 7, phpinfo() and composer still think its php5.5
问题描述
专门针对php_osx开发人员的问题:
Question specifically for the php_osx developers:
我按照您的指示在运行10.10.5的Mac上安装了php 7.1.(命令curl -s https://php-osx.liip.ch/install.sh | bash -s 7.1
)一切看起来都不错,但是运行composer.phar脚本时,它说我不需要最新版本的Packagist的软件包,因为我的PHP是版本5.phpinfo()
也说它是版本5.怎么了?
I followed your instructions and installed php 7.1 on my Mac running 10.10.5.(command curl -s https://php-osx.liip.ch/install.sh | bash -s 7.1
) Everything looked ok, but when running a composer.phar script, it says I can't require the latest version of a package at Packagist since my PHP is version 5. phpinfo()
also says it's version 5. What is wrong?
推荐答案
您必须在Apache设置(httpd.conf
)中加载正确的PHP模块.
You have to load the right module of PHP in your Apache settings (httpd.conf
).
#LoadModule php5_module /usr/local/Cellar/php56/5.6.29_5/libexec/apache2/libphp5.so
LoadModule php7_module /usr/local/Cellar/php71/7.1.8_20/libexec/apache2/libphp7.so
然后,您必须重新启动Apache服务器以应用更改.
Then you have to restart your Apache server for the changes to apply.
sudo apachectl restart
这篇关于php_osx已安装php 7,phpinfo()和作曲家仍然认为其php5.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!