0

This question already has an answer here:

I am using Drush to update modules. When I run the command php -v it correctly shows I am running version 5.5

I then use the command drush rf followed by drush up to perform any updates.

I am using the Schema.org Metatag module which requires php version 5. The website is running php version 5.5.37

The default CLI version on Hostgator shared server is 5.4.45. That is what I was originally using for drush. When I received the message below I found the path to use php 5.5 but I am still getting the same message. So I can't figure out how it still sees php ver 5.4.45 and how to resolve this so it doesn't keep disabling that module.

When Drush runs an update I get the following message: Schema.org Metatag requires at least PHP 5.5. (Currently using PHP [warning] 5.4.45)

And then it disables the Schema Metatag module.

NOTE: When I run command drush status: PHP configuration: opt/php55/lib/php.ini Drush version is 8.1.11

Thanks

Extra information

.bash_profile

PATH=$PATH:$HOME/bin 
export PATH 
alias composer="/opt/php55/bin/php ~/bin/composer.phar" 
alias drush="/opt/php55/bin/php ~/.composer/vendor/bin/drush.php" 

.bashrc

 alias php='/opt/php55/bin/php' 
 alias composer='/opt/php55/bin/php ~/bin/composer'
 export DRUSH_PHP='/opt/php55/bin/php' 
  • php -v returns PHP 5.5.37
  • which php doesn't return anything
  • drush status returns PHP configuration /opt/php55/lib/php.ini

But, when I use Drush to update a module I still get: Schema.org Metatag requires at least PHP 5.5. (Currently using PHP [warning] 5.4.45)

marked as duplicate by kiamlaluno Feb 9 at 19:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0
  • Find the path to php 5.5’s binary.
  • Find the path to drush.

Execute

/path/to/php_55/bin/php /path/to/drush status
  • My .bash_profile PATH=$PATH:$HOME/bin export PATH alias composer="/opt/php55/bin/php ~/bin/composer.phar" alias drush="/opt/php55/bin/php ~/.composer/vendor/bin/drush.php" My .bashrc alias php='/opt/php55/bin/php' alias composer='/opt/php55/bin/php ~/bin/composer' export DRUSH_PHP='/opt/php55/bin/php' When I run following commands php -v PHP 5.5.37 which php doesn't return anything drush status PHP configuration /opt/php55/lib/php.ini But, when I use Drush to update a module I still get: Schema.org Metatag requires at least PHP 5.5. (Currently using PHP [warning] 5.4.45) – Jimmyk Jul 8 '18 at 12:27
  • @Jimmyk if you go to the status page, what php version does Drupal say it’s using? – rovr138 Jul 8 '18 at 14:50
  • 1
    @Jimmy Drush doesn’t source .bash_profile or any other/equivalent when it executes. Anything you have in there is pretty much irrelevant to Drush. – Clive Jul 8 '18 at 16:06
  • When you say status page you mean the command drush status? For PHP configuration: /opt/php55/lib/php.ini so that must mean PHP 5.5 But the version of Drush I am using is 8.1.11 Is that only 5.4? Does that mean I need to update Drush version? – Jimmyk Jul 9 '18 at 22:05
  • Status page in your site. Log in then go to Reports > Status Page. Drush should be using 5.5 per your comment and the DRUSH_PHP var. I can only think that Drupal may be using a different one, 5.4.45. The drush and Drupal versions can be different. – rovr138 Jul 9 '18 at 22:09

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