Recently, however, I installed MAMP to debug some older, PHP4-specific code. […] I also use Drush, which is an indispensable Drupal command line tool, and I began getting the following error on some sites: Drush command could not be completed.
This only caused a problem when he went back to his previous PHP5-based installation. He finally found the culprit – a section of the Drush script that looked for MAMP installs and tried to use those binaries and configuration files (the PHP4 ones) instead of his more correct PHP5 ones. A quick commenting later everything worked fine.