PHP version shown in command line differs from phpinfo(); in localhost:8000
Solution 1:
The new version of PHP needs to be in your $PATH and the path to the new version of php needs to be listed before /usr/bin
. If the new version of php (the executable) is installed in /usr/local/bin/
you should be in good shape, otherwise you need to either link the new php executable there (ln -s /path/to/newphp /usr/local/bin/php
) or add it's location to your $PATH (export PATH=/path/to/newphp:"${PATH}"
) (<- add this to your ~/.bash_profile).
One other possibility to check... is the new version of php named php
? It's possible that it will be named something like php5
or some such thing. If so you'll need to create a a link or use that name on the command line.