问题原文
原帖链接 · user1800997 · CC BY-SA 3.0
I manually installed php 5.4 on Ubuntu 10.04. The old version was 5.3.2. Now if i check the php version it shows 5.4:
max@ubuntu:/etc/php5$ php -v
PHP 5.4.0 (cli) (built: Jul 21 2015 14:04:16)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
But if i load index.php file in /var/www/ the apache still shows that the php version is 5.3.2.
How to make apache recognize the new php 5.4 version?
社区高分解答
原帖链接 · ohjay · CC BY-SA 4.0
Same problem here, but a2dismod did not work. I solved it removing the old apache config from /etc/apache2/conf-enabled and adding the right one from conf-available
cd /etc/apache2/conf-enabled
sudo rm php5.6-fpm.conf
sudo ln -s ../conf-available/php7.2-fpm.conf
restart apache et voilà!
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
