我已經PHP更新後PHP5到/和安裝7更新PHP5到PHP7 Ubuntu的14
當我運行php -v
:
PHP 7.0.23-1+ubuntu14.04.1+deb.sury.org+1 (cli) (built: Aug 31 2017 12:52:39) (NTS)
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache **v7.0.23**-1+ubuntu14.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
但我的phpinfo()仍然在:
PHP Version 5.5.31-2+deb.sury.org~trusty+1
我該如何處理PHP7而不是PHP5?
相關? [Ubuntu 14.04:升級到php7並卸載php5?](https://stackoverflow.com/questions/40611976/ubuntu-14-04-upgrade-to-php7-and-uninstall-php5) – FirstOne
如果你不需要要在服務器中擁有兩個不同版本的PHP,您應該刪除PHP5。或者如果你想讓你必須配置Apache conf文件來知道它必須使用哪一個。 – Vindic
@Vindic我不需要PHP5,我運行了 $ apt-get update && apt-get purge php5-fpm && apt-get --purge autoremove && apt-get install php7.0-fpm php7.0 -mysql php7.0-curl php7.0-gd php7.0-json php7.0-mcrypt php7.0-opcache php7.0-xml 沒有任何變化 – KJA