I have installed the latest php version on my mountain lion system using these instructions (http://mac.tutsplus.com/tutorials/server/upgrading-the-native-php-installation-on-os-x-mountain-lion/). I even put /usr/local/bin first in my path variable, so when I run php -v at the command line I get php v5.4.x The problem is that when I run a simple script (with the phpinfo() function inside) the page tells me that I am running the old 5.3.x php version that comes pre-installed with mac os mountain lion. I even tried to restart apache, but the problem remains. Any ideas on this one? Thank you.
That tutorial you followed is a bit dangerous. It seems it tells you to replace the default X11 with a new one, which is a really bad unnecessary idea.
Where did you change your local variable? If you used .profile or .bash_profile it is only valid for your user. To affect all users you need to change /etc/paths. But I don't think it has anything to do with the PATH var.
Regarding your question, this means Apache is not loading the correct PHP module. (libphp5.so)
Check the creation date of
If it predates your build time, then it was not replaced.
Let me know if it worked for you