mac OS X中升级php5.5至php5.6 or php7

在做php项目中,提示“Warning. PHP 5.6 or newer is required. Please, upgrade your local PHP installation.” 通过phpinfo()查看,当前的版本号是php5.5,于是上网搜索如何快速升级php。

参考网址: http://coolestguidesontheplanet.com/upgrade-php-on-osx/

真的是非常方便。仅仅需要一条命令:

curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6

这个命令会执行很长时间,大概20分钟左右

最终升级完成并成功后,会有如下的输出

Executing post-install script /tmp/5.6-10.10-frontenddev-post-install
Create symlink /usr/local/php5/entropy-php.conf /etc/apache2/other/+php-osx.conf
Restarting Apache
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using caoxindeMacBook-Pro.local. Set the 'ServerName' directive globally to suppress this message
Syntax OK

再次通过 phpinfo() 查看,php的版本已经完成升级。

上一篇:【Spring】1、Spring 中的监听器 Listener


下一篇:“全栈2019”Java多线程第七章:等待线程死亡join()方法详解