I use Marc Liyanage’s PHP5 distribution on my Mac instead of the version that comes installed with OS X; sooner or later I usually find that there’s some extension that’s either missing or too old for a particular development requirement, and Marc’s distribution is usually a little more up to date and complete.
Recently, however, I installed MAMP to debug some older, PHP4-specific code. It was perfect for my needs, since it’s self-contained and I didn’t need to muck with my base Apache/PHP stack just to spend a couple of hours in PHP4.
I also use Drush, which is an indispensible Drupal command line tool, and I began getting the following error on some sites:
Drush command could not be completed.
It seemed to occur after enabling some new modules, and when I finally got one site back to a state where I could run the drush status command, I noticed that drush was using MAMP’s php.ini file instead of Marc Liyanage’s, which seemed odd; I double checked and verified that the command line PHP executable was using the expected file in /usr/local/php5/lib/php.ini.
Finally, I looked at the contents of the drush shell script itself, and figured out what was happening. There’s an if/else block at the end of the script which checks for MAMP and XAMPP, and uses their PHP executables if found… so even though I wasn’t actually using MAMP any more, drush was finding it and using its PHP executable instead. I commented out the test for MAMP and the ‘command could not be completed’ errors went away.


I'm always grateful for all
I'm always grateful for all those hours I spent about compiling and recompiling PHP and Apache on my little old Pentium 200 Linux box 9 years ago.
5.3 on Mac
Whats the best way to get PHP5.3 on Max OSX10.5? I have not liked MAMP in the past.
The eternal dilemma
Thanks dalin, I'll have to check out Zend Server.
I always have a hard time with the decision to use binary distributions or compile from scratch... sometimes you wind up with no choice but to build from source, and in those instances I'm always grateful for all those hours I spent about compiling and recompiling PHP and Apache on my little old Pentium 200 Linux box 9 years ago. These days I'll almost always opt for the binary installer if I possibly can. :)
other options
It's not too hard to build current versions of the LAMP stack from source especially with a little help.
I have some scripts as part of the homebrew project that include PHP 5.11 etc.
MAMP could be the worst AMP
MAMP could be the worst AMP stack ever put together. A few months ago I finally had enough and I tried out Zend Server. I _highly_ recommend it. Beats MAMP hands down in everything from ease of install, to ease of configuration, to performance. You can just symlink the webroot (and maybe even the MySQL data store if you like to live dangerously) until you are sold on it.
Good to know...
...how Drush works ! Thanks !
Post new comment