Apache显示php版本错误 [英] Apache shows wrong version for php
问题描述
我已经在Mac Snow Leopard上手动安装了php 5.4.6.但是当我配置&重新启动apache并调用phpinfo()方法,它将php版本显示为5.3.8,这很可能是Mac OS X随附的预安装系统php.
I've installed php 5.4.6 manually on mac snow leopard. But when I config & restart apache and call phpinfo() method it shows php version as 5.3.8 which probabely is the pre-installed system php that comes with Mac OS X.
我应该如何解决此问题,并告诉apache使用php 5.4.6而不是系统php?
How should I fix this and tell apache to use php 5.4.6 instead of system php?
最诚挚的问候,
推荐答案
您应该能够在/etc/apache2/httpd.conf 中指定要使用的PHP版本.说:
You should be able to specify which PHP version to use in /etc/apache2/httpd.conf, look for a line that says:
#LoadModule php5_module libexec/apache2/libphp5.so
取消注释此行,并将其指向您已安装的最新版本的PHP.
Uncomment this line and point it to the newest version of PHP you have installed.
这篇关于Apache显示php版本错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!