Difference between PHPINFO and WHICH PHP on Mac
Posted on 2011-09-03
I have just installed MAMP on my Mac, without an issue.
However, I have an issue where the PHP.ini file being used by Apache (installed via MAMP) appears to be different from the PHP.ini file being used by the CLI.
Here are the details...
I am trying to install the ViMP CMS system on the machine, which requires the SourceGuardian extension to be installed.
The SG extension was installed with no problem, and details of the extension are showing up in phpinfo().
As part of the setup process, Vimp requires a command to be entered in the CLI, which executes a php file, which is encrypted using SourceGuardian.
However, when I attempt to run this php file, it crashs on the 2nd line, reporting that it cannot find the SourceGuardian library.
I investigated further, and checked the PHP.ini file that was being used.
Reported by Apache via phpinfo(): /Applications/MAMP/bin/php/php5.3.6/conf
Reported by CLI via "which php": /usr/bin/php
This at least seems to explain why it can't find the SG library, as it is not specified in the /usr/bin/php version of the php.ini file.
I understand that PHP comes preinstalled, but not activated, with the Mac. It has not been activated.
Can anyone give any advice??