Answers.Body: <p>That sounds like your command line version of php is different to the one being used by your webserver.</p>
  
  <p>See eg <a href="https://drupal.stackexchange.com/questions/44967/the-php-version-is-not-correctly-detected">https://drupal.stackexchange.com/questions/44967/the-php-version-is-not-correctly-detected</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-09T13:54:11.753Z
Answers.Text: 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.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-10T14:14:04.427Z
Answers.Text: 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!
Answers.UserDisplayName: Billyjames
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-11T13:22:56.180Z
Answers.Text: Is there a variable called DRUSH_PHP defined in .bashrc or .bash_profile in your home folder?
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-09T13:50:03.580Z
Answers.LastActivityDate: 2019-09-09T13:50:03.580Z
Answers.UserDisplayName: Aidan
Answers.Body: <p>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</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-20T20:16:58.580Z
Answers.LastActivityDate: 2019-09-20T20:16:58.580Z
Answers.UserDisplayName: ericG
Body: <p>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.</p>
  
  <p>Error message:</p>
  
  <p>CiviCRM requires PHP 7.0.0+. The web server is running PHP 5.6.40. Drush command terminated abnormally due to an unrecoverable error.</p>
  
  <p>The Drush commands seem to execute, though. The commands have nothing to do with Civi, BTW - these are standard install/enable Drush commands.</p>
  
  <p>See related issue at:</p>
  
  <p><a href="https://civicrm.stackexchange.com/questions/31747/errors-in-functions-php-after-installing-5-16-2-on-drupal-7/31846#31846">Errors in functions.php after installing 5.16.2 on Drupal 7</a></p>
  
  <p>Any guidance appreciated...</p>
  
Tags: <php><drush>
Title: Civi 5.x not recognizing PHP 7.1 in Drush
ThreadText: # Civi 5.x not recognizing PHP 7.1 in Drush
  
  (Asked by: username_0 on 2019-09-09)
  
  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](https://civicrm.stackexchange.com/questions/31747/errors-in-functions-php-after-installing-5-16-2-on-drupal-7/31846#31846)
  
  Any guidance appreciated...
  
  **Tags:** php, drush
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-09-09. Score: 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>
  
  > **Comments:**
  > **username_2**: Beat me to it by about 30 seconds. Yes agree with username_1. @username_0 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.  
  > **username_0**: 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!  
  > **username_2**: Is there a variable called DRUSH_PHP defined in .bashrc or .bash_profile in your home folder?  
  
  ---
  
  ### Answer by username_3 on 2019-09-20. Score: 1
  
  I hit this on a few servers and it was driving me insane.
  username_2'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
  
  
  ---
  
  