By zzolo
2009, May 23 - 12:14pm

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.

5 comments

 
Kathleen wrote 1 year 7 weeks 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.

 
Mike Hunter wrote 26 weeks 1 day ago

A few years ago, Dreamhost

A few years ago, Dreamhost was excellent. Good prices, good service, good uptime. Then, earlier previous year (2009), they seemed to be slipping. First, it was billing errors, then I had problems renewing my hosting. In the last four months of 2009, their servers have been down several hours a month during peak business hours. I run several sites, and all were messed up by server migrations and their other problems (which as annoying as it is, but especially in case of providing mp3 search service).
They are no longer very cheap, and their entertaining newsletters don't make up for their frustrating lack of reliability. Nothing personal, I just expressed my opinion.

 
Ben Hurtisson wrote 11 weeks 2 days ago

Thanks for great news. I will

Thanks for great news. I will use this host for my future web design projects.

 
Julia wrote 8 weeks 6 days ago

In the nick of time

Thanks for sharing that. I was having the same problem and was thinking of changing host instead. Luckily I read your post before taking the trouble to move my body detox site to another host.

 
Masked User wrote 7 weeks 6 days ago

DreamHost Acceptable Content

When considering a web host we would like you to consider the following (especially parents of young children)

DreamHost has recently started to host a site called kewtr.com after the sites account was suspended by its previous web host(s). We have complained that this site actively and continually expoits children. They have replied that they will not take action because "we are unable to identify any existence of child pornography as per the current US laws on the site."

We ask that you spend a few minutes to look at the site kewtr.com and consider this when you next look for a web host (I'm afraid you will have to join the site to read its forum). This is not about censorship (which we oppose), it is about child exploitation.

Thank You

Recent Books

Haiku and a Portrait

The Uncertainty Principle

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

The Tweet of Zzolo

  • Wow Dell, how many times can you change my "account manager" in one year? We are up to 4 so far. I am hoping for 7.
    6 hours 33 min ago
  • Just made lots of pizza dough for party tomorrow. Now I have all night and tomrrow to think of what to put on all those pizzas.
    22 hours 38 min ago
  • @webchick, @arianek, @sdboyer, and whoever else wants to give feedback on first draft of #drupal CVS review process: http://bit.ly/a9bUiK
    23 hours 57 min ago
  • @bangpound Yeah, thats basically what I am going through right now. It's a big change.
    1 day 6 hours ago
  • #drupal question of the day: Do I not know how to use Panels, or does Panels not know how to use me? :)
    1 day 6 hours ago

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