1

This is the second site I've noticed this on - in both cases, the site is running PHP 7.1.32, as reported on the Drupal system status page.

Error message:

CiviCRM requires PHP 7.0.0+. The web server is running PHP 5.6.40. Drush command terminated abnormally due to an unrecoverable error.

The Drush commands seem to execute, though. The commands have nothing to do with Civi, BTW - these are standard install/enable Drush commands.

See related issue at:

Errors in functions.php after installing 5.16.2 on Drupal 7

Any guidance appreciated...

3

That sounds like your command line version of php is different to the one being used by your webserver.

See eg https://drupal.stackexchange.com/questions/44967/the-php-version-is-not-correctly-detected

| improve this answer | |
  • Beat me to it by about 30 seconds. Yes agree with Aidan. @Billyjames the answers also given in your other post are also likely correct. Type php -v on the command line to see what the command line is using vs what the web server is using. – Demerit Sep 9 '19 at 13:54
  • Nope. Here's the result: PHP 7.1.32 (cli) (built: Sep 4 2019 15:29:27) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies. Thanks for the response, though! – Billyjames Sep 10 '19 at 14:14
  • Is there a variable called DRUSH_PHP defined in .bashrc or .bash_profile in your home folder? – Demerit Sep 11 '19 at 13:22
1

I hit this on a few servers and it was driving me insane. Demerit's comment pointed me to the answer. long ago, someone had added alias drush='/usr/bin/php5 /usr/local/bin/drush' to /etc/bash.bashrc I commented that out and all works as expected

| improve this answer | |

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.