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: http://groups.drupal.org/node/20433, 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.php.net && pear install pecl/json)
I listed out the files in the package:
#rpm -ql php-pecl-json
/etc/php.d/json.ini
/usr/lib64/php/modules/json.so
/usr/share/doc/php-pecl-json-1.2.1
/usr/share/doc/php-pecl-json-1.2.1/README
/usr/share/pear/.pkgxml/json.xml
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');
to
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/table.inc on line 1
This post provided the solution: http://drupal.org/node/515568
yum install -y php-pear-Console-Table or (pear install Console_Table)
cp /usr/share/pear/Console/Table.php table.inc
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
Back |