Apache and two versions of php on osx-lion

我怕爱的太早我们不能终老 提交于 2019-12-14 01:24:50

问题


I have to version of PHP installed on my lion osx

/opt/local/bin/php (5.3.12)
/usr/bin/php (5.3.10)

When I try to install php modules using port, it refers to /opt/local/bin/php (5.3.12)

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.

How can I fix this issue?
My goal is to install php-modules using port which affects the php used by apache.


回答1:


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.



来源:https://stackoverflow.com/questions/10870774/apache-and-two-versions-of-php-on-osx-lion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!