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的版本已經完成升級。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM