You have two PHP-installations on your Mac. One of them is the default OS-X php whos binary is located under /usr/bin/php
and the other one seems to be a kind of the liip one-line installer which is located under /usr/local/php5
When you call php -i
on the command-line the MacOS-X default php under /usr/bin
is called. And when you run a phpinfo()-script your WebServer calls the apache-module of the PHP located under /usr/local/php5
.
So when you want to remove one of your installations, I'd recommend removing the one under /usr/local/php5
as the otehr one is bundled with your OS and the files are located all over the filesystem and it's not that easy to get rid of everything related.
But if you want to upgrade your PHP installation you might simply call the one-line-installer from liip again which will install the new version in a new directory under /usr/local/
and link it against the /usr/local/php5
-folder.
And if you want to call those new binaries you can either adapt your $PATH-Variable so that /usr/local/php5/bin
comes before /usr/bin
or you simply call it directly usig the full path to the binary like /usr/local/php5/bin/php -i
.
manpreet
Best Answer
2 years ago
I'm wanting to update the local version of PHP on my Mac.. i've been doing some digging and got a little confused.
If i run php -i from the terminal it says:
I was sure i had 5.4 installed so ran phpinfo();
A problem i'm having is i can't seem to make any php.ini file work, i'm getting lots of
errors, so error reporting is too high, but no matter how many php.ini files i find and edit it's not taking effect..
I have no idea which version of PHP is being used or why there is two.
Is it possible to disable or remove one of them so i know exactly whats going on, and then i can update it to a newer version?
Thanks,