升級的步驟:參考https://www.digitalocean.com/community/questions/how-to-upgrade-from-php-v-5-5-9-to-v-5-6
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5.6 php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml
(進行到這步的時候,php5.6就已經裝好了,dpkg --get-selections | grep -v deinstall | grep php查看一下,可以看到后面的截圖的效果!)
sudo a2dismod php5
(這個好像是移除php5的)
sudo a2enmod php5.6
sudo service apache2 restart
-------------------------------------------------------------------------------------------------------------
dpkg --get-selections | grep -v deinstall | grep php
用這個命令去看安裝在你的服務器上的php的包,
You can also use dpkg --get-selections | grep -v deinstall | grep php
command to see the PHP packages installed on your server to add them for PHP 5.6 if necessary.
php進程還沒有啟動起來