I need to get php 5.3 working on my os server (snow leopard) machine. When I goto a php webpage on the server that is running phpinfo() it tells me that I am running php version 5.2.14, also it informs that php is installed at /private/etc/php.ini. Strangely, when I log onto the server and execute php -v from the terminal it tells me I am running version 5.3.0 and which php tells me that is installed at /opt/local/bin/php. I am confused that I am getting conflicting data from these two sources. How do I make it so that the php version being used on the server is the 5.3.0 version?
You need to edit the Apache config to make it load the new php module, rather than the one that came with the OS. First, find the module you built (not the php program, the loadable module that runs inside Apache); it's probably named something like /opt/local/apache2/modules/libphp5.so. Then, edit /etc/apache2/httpd.conf to load it instead of the builtin one. Find the "LoadModule php5_module" line, and replace "libexec/apache2/libphp5.so" with the path to your updated module.