If possible, I'd like to retain the default Apache installation and simply direct it to use a different version of PHP built/installed using MacPorts. Is this possible (and if so, is there a straightforward process for setting this up)?
I know Apache wants me to specify the PHP module to load, but its not clear to me how I might have it use a different PHP installation (if thats even possible). Do I need to compile a new apache module that would somehow point to my copy of PHP built with MacPorts? Any clarification on what I need to do would be greatly appreciated!
Update: What about enabling FastCGI and running PHP via that instead of an apache module? I know there are tradeoffs between the two approaches, but would this be a possibility or would I run into similar problems?
Best Answer
Macports PHP libphp5.so is usually not compatible with OSX's default Apache system. Here's what happens on my macosxserver.
Attempt to start the server
You can easily compile PHP to use your default Apache installation, by setting the path to your default
apxs
.Of course, (re-)compiling PHP might be more work then you wish to inherit. The easist way would be to accept Macport's Apache installation, and adjust your osxserver to use
/opt/local/apache2
as your default HTTPD service.