问题
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