Apache和在OSX狮子PHP的两个版本 [英] Apache and two versions of php on osx-lion
问题描述
我要安装在我的狮子OSX版本的PHP
I have to version of PHP installed on my lion osx
/opt/local/bin/php (5.3.12)
/usr/bin/php (5.3.10)
当我尝试使用端口
安装PHP模块,它指的是的/ opt / local / bin目录/ PHP(5.3.12)
When I try to install php modules using port
, it refers to /opt/local/bin/php (5.3.12)
但是,当我启动Apache使用的是Web服务器的/ usr / bin中/ PHP
,因为如果我看的的phpinfo
的Apache网络服务器,它告诉我 PHP版本5.3.10
。
But when I start the web server the apache is using /usr/bin/php
because if I look to the phpinfo
on the apache webserver it tells me PHP Version 5.3.10
.
我怎样才能解决这个问题?结果
我的目标是利用安装PHP模块端口
这影响了 PHP
被Apache使用。
How can I fix this issue?
My goal is to install php-modules using port
which affects the php
used by apache.
推荐答案
Apache是既没有使用这些地点,其实 - 如果你没有改变的配置,它使用在 PHP模块/usr/libexec/apache2/libphp5.so
。如果MacPorts的安装创造了一个类似的模块在 /选择
的地方,你需要编辑 /etc/apache2/httpd.conf
来指向新的位置;如果没有,你需要得到它让你的。
Apache is using neither of those locations, in fact -- if you haven't changed the configuration, it's using the PHP module at /usr/libexec/apache2/libphp5.so
. If the Macports install created an analogous module under /opt
somewhere, you'll need to edit /etc/apache2/httpd.conf
to point to the new location; if it didn't, you'll need to get it to make you one.
这篇关于Apache和在OSX狮子PHP的两个版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!