DrupalDork.com was shut down on September 18, 2013. This is just a snapshot of the site as it appeared then.

Posts from January 2011

Drush with Homebrew & MAMP Pro

Sometime over the past few weeks, Drush stopped working for me. I could run drush st just fine, but anything that actually touched the database (like drush cc or drush up) gave me the dreaded "Drush was not able to start (bootstrap) the Drupal database" error. And since I'm always tweaking and changing settings on my system, I had no idea what I had done to break it.

My first thought was that I had killed it with Homebrew. I recently nuked my manual install of Drush so I could use Homebrew to update it every now and then. Once you install Homebrew, you can have Drush installed and configured really easily: brew install drush The same command will update it, too. But that wasn't the problem.

I'm also using MAMP Pro for local development, so that was the next culprit. I'm really not sure what happened - or for that matter, why I was able to run MAMP at all - but the php binary was no longer executable (or maybe, never had been?). This didn't seem at all like it would be the problem: after all, Drush was executing, and claimed to have a problem accessing the database. Still, changing the permissions on that binary did the trick:


sudo chmod a+x /Applications/MAMP/bin/php5.2/bin/php
sudo chmod a+x /Applications/MAMP/bin/php5.3/bin/php

Since I sometimes have to switch between PHP 5.2 and 5.3 for testing, I made sure to hit both versions.

Category: