I am not able to get Drush to recognize the installed PHP 5.4.20 (cli).

$ php -v
PHP 5.4.20 (cli) (built: Oct 10 2013 18:41:48) 

$ drush
Your command line PHP installation is too old. Drush requires at     [error]
least PHP 5.3.3.

I logged out and in. Any quick thoughts?

  • 1
    You could try to run Drush calling absolute PHP: /usr/bin/php7.1-cli ~/drush.phar status and then create an alias for it. alias drush='/usr/bin/php7.1-cli ~/drush.phar'. – leymannx Jul 25 '19 at 18:51

Have you just now updated your PHP than you may need to restart the apache and check if it works, and still if you get the above error than check Installing and Troubleshooting Drush.

One dirty hack of installing the drush is mentioned here: https://drupal.org/files/drush-document_env_var-1841324-25.patch. But I won't recommend you to use this as you are already having the PHP 5.4 and that hack for PHP version < 5.3.3

  • 2
    Restarting Apache will not do anything to command line interface PHP, right? They are pretty separate sets of configs, and have separate executables. They do indeed share most of their code (it's in a library used by all interfaces afair), but one interface can't prevent another from working correctly. – Mołot Oct 23 '13 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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