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
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"
alias php='/opt/php55/bin/php' alias composer='/opt/php55/bin/php ~/bin/composer' export DRUSH_PHP='/opt/php55/bin/php'
php -vreturns PHP 5.5.37
which phpdoesn't return anything
drush statusreturns 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)