You may get unexpected errors or warnings when running PHP scripts on the command-line. This usually doesn't happen if PHP is distributed natively with the system (eg with Ubuntu or Debian Linux), but it can commonly happen on systems that use an add-on *AMP stack (such as MAMP, WAMP, or XAMPP).


Determine which version is used in your command-line, run:

me@hostname:~$ which php
me@hostname:~$ php -v
PHP 5.3.10 with Suhosin-Patch (cli) (built: Feb 20 2012 22:55:53) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

The "/usr/bin/php" is the default copy provided by OS X – which is usually not as good as the version provided with MAMP. To locate the version provided by MAMP, run:

me@hostname:~$ find /Applications/MAMP -name php -type f -exec dirname {} \;

Pick the version which is compatible with CiviCRM (at time of writing, 5.3.x) and then add it to ~/.bash_profile or ~/.bashrc, e.g.:

export PATH="/Applications/MAMP/bin/php/php5.3.14/bin:$PATH"

To make sure the change takes effect, you should