By zzolo
2009, May 23 - 11:14am

Drupal, Drush, and Dreamhost: A Quick Revelation on PHP Command Line

I use Dreamhost for some of my personal sites and for some friends. Dreamhost's basic package is nothing too powerful, but I like them; they are cheap, responsive, responsible, green, and funny. I also love some Drush. But for the life of me, the newer versions of Drush were throwing weird errors, mostly involving syntax. But when I went into the code, I could not find any syntax errors. Some of the errors suggested I was using PHP4, but I was like "No, I am definitely using PHP5 with Dreamhost."

Apparently, I was wrong! Looking through the issue queue of Drush today, I came across this comment which explains how to manually use PHP5 for the Drush alias, and it occured to me that my host could be doing that. Searching the interwebs a little, this was the best documentation on Dreamhost's setup that I could find. Apparently, Dreamhost uses PHP4 for the command line by default.

So, I changed by alias definition in my .bash_profile file to:

  1. # Drush
  2. #-----------------------------------------------#
  3. alias drush='/usr/local/php5/bin/php /home/alanpalazzolo/.drush/drush/drush.php'

And voila! Drush is working!!! Thanks to ericrdb and the wonderful developers of Drush.

1 comment

 
Kathleen wrote 30 weeks 3 days ago

run php5 in the shell

You can run php5 by default for your shell with these commands:


echo 'export PATH="$HOME/packages/bin:$PATH"' > .bash_profile
mkdir -p packages/bin
ln -s /usr/local/php5/bin/php packages/bin/php

Basically, just need to softlink the php binary into the first directory that is in your PATH.

Hmm. I suppose I'll cross post this back to the original issue.

Haiku and a Portrait

The Uncertainty Principle
The last moments of 2009

Floating on the air
everywhere and somewhere,
nowhere, only here.

Recent Books

Freakonomics Cover (cherryhillbooks.com/images/books/freakonomics.jpg)
Development as Freedom cover by Cover Browser (http://www.coverbrowser.com/image/bestsellers-2007/2013-1.jpg)
Pro Drupal Development: Second Edition Cover from Cover Browser (http://www.coverbrowser.com/image/bestsellers-2007/3532-1.jpg)
Pro JS Techniques Cover from eBook Networking (http://www.ebooknetworking.com/books/159/059/big1590597273.jpg)
Snow Crash Cover taken from CyperPunkReview (http://www.cyberpunkreview.com/images_books/SnowCrash.jpg)
Designing Interfaces Cover Image from textbooksrus.com
Cover image of Dreaming in Code (taken from Amazon)

The Tweet of Zzolo

  • Drupal Camp Spain, lookout! Zzolo's coming to Barcelona! http://drupalcamp.es/
    1 day 5 hours ago
  • @pcambra Yeah! Just booked my plane ticket. Now looking for cheap accomodations near the Camp. Any ideas?
    1 day 5 hours ago
  • @theunraveler dont forget to allow access to anonymous users. We like the API as well.
    1 day 16 hours ago
  • Worldwide Drupal Happy Hour! It's awesome to see how my simple idea of regularly drinking and Drupal proliferates. http://zroger.com/node/33
    3 days 8 hours ago
  • Thanks /usr/share/calendar (though you may be wrong sometimes): Feliz Constiution Day, Mexico!
    3 days 15 hours ago

Twitter Icon Flickr Icon LinkedIn Icon Facebook Icon Drupal Association, Individual Member icon