Theresa Arzadon-Labajo

Drush with PHP 5.1.6

Posted by Theresa Arzadon-Labajo (tarzadon) on Jul 10 2009
Tech Stuff >> Drupal

I tried to install and run Drupal Commandline (Drush) , but got the error:

Your PHP installation is too old. Drush requires at least PHP 5.2.0

According to:, Drush does not actually *require* PHP 5.2.0, it just requires the JSON functionality for PHP.

I installed JSON:
yum install php-pecl-json or (pear channel-update && pear install pecl/json)

I listed out the files in the package:
#rpm -ql php-pecl-json

Restarted apache in order to load the module:
server httpd restart

Then, I changed the line in drush/drush.php, from:
define('DRUSH_MINIMUM_PHP', '5.2.0');
define('DRUSH_MINIMUM_PHP', '5.1.6');

I tried to comment out the whole section, but then drush would not work at all.

Running drush still would not work, but it gave an error in php.log:
HP Parse error:  syntax error, unexpected T_STRING in ...../drush/includes/ on line 1
This post provided the solution:

yum install -y php-pear-Console-Table or (pear install Console_Table)
cp /usr/share/pear/Console/Table.php

Now drush works.

Add   alias drush='/path/to/drush/drush' to .bash_profile and you're good to go.


Last changed: Feb 27 2020 at 1:06 PM