I tried to get Sass and Compass working on Windows, but I ran into too many problems. Now I have purchased a vintage Macbook Pro (2008). I finally got Drush working on Windows, but I can't seem to get Drush to work on the Macbook.

On the Mac, I am using a MAMP Stack. I tried installing Drush 6.0, but it began to ask for Composer and other such further complications. I installed Pear, but could not figure out the instructions to use Pear to install Drush. So I tried a simple installation of Drush 6.0 from a tar file. I installed it in the '/Applications/MAMP/htdocs' directory. It could download modules and themes, but Drush couldn't do a simple status check or clearing cache. Somehow it could not interact with Drupal.

Next I tried a zip download of Drush 5.9. When I try to launch Drush, Drush can show a status report. It reports Drupal, but incorrectly reports the Garland theme as default theme. By the way this same output happens if I am in the Omega-Theme working directory or the Drupal-Root working directory.

Drush also fails to accomplish clear the cache; it can only clear its own cache. drush pm-list returns an error message about Drush not being able to bootstrap the Drupal database.

I read the ReadME file in the Drush installation directory; I tried to follow the instructions to set the PHP directory in .bash_profile. Then trying to follow the instructions for configuring php.ini, I got lost in finding out the PHP versions used by the webserver. (I suppose this means MAMP.)

Now I am at a loss as what to do next to get Drush working.

Any help is greatly appreciated.

  • if you run a drush command with the params -vd it will give you more thorough debugging output that may be useful in resolving your problem. This should at least tell you what php.ini is being used.
    – rooby
    Sep 16 '14 at 5:23
  • 1
    It is quite possible that your drush isn't using your WAMP version of PHP so it doesn't have mysql support and fails when it tries to do database stuff.
    – rooby
    Sep 16 '14 at 5:24
  • rooby might be right. I am using multiple versions of drush (5,6,7) on my MacBook Pro and ran into similar problems. It's quite possible that drush is not using the correct php.ini file, see drupal.org/node/1465956#comment-5793124 for details.
    – Paul
    Sep 16 '14 at 6:53

RESOLVED. 9/22/2014

I began to discover that the previous method of attempting to change the 'alias' or otherwise redirecting Drush to use MAMP's PHP was the wrong way to go. Especially 'name-distorting' the original MacBook-OS-PHP so that Drush would opt for the MAMP-PHP was causing all kinds of problems with other software, as might be expected. I don't know how this method came to be recommended, but it appears that it is actually a pit-fall.

The way better approach (watch me eat my words in a few weeks), is to rather just upgrade the MacBook-OS-PHP to the same or nearly same version as the MAMP-PHP. Then it does not matter which version of PHP Drush or anything else uses because they are both the same. This overcomes all the issues and is not that difficult to accomplish. At least on my platform which is a MacBook-Pro (2008-Mavericks).

The way that I upgraded my MacBook-OS-PHP was by the CLI-command "curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5".

This is a download from a group of developers in Germany which upgrades your PHP. Check out "http://php-osx.liip.ch/".

Once my System-PHP and MAMP-PHP were almost the same, all my issues with Drush went away. I undid all my 'aliases', 'redirects' and 'name-distortions'. So far all is working well.

Note that on my machine MAMP is using PHP-5.5.14 and my CLI reports with a "php -v" command that MacBook-OS is using PHP-5.4.30 though I am not sure that the version is accurate. In the write up on the PHP-Upgrade it mentions that the version might not be accurate.

By the way this does not OVERWRITE your previous PHP installation but rather just adds a newer installation and directs your system to use it.

I will update if there later prove to be drawbacks in this approach.

Not the answer you're looking for? Browse other questions tagged or ask your own question.