I was trying to use command line to upgrade CE 2.3.0 to CE 2.3.1. I am following instructions on https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade.html. Everything seems running ok during upgrade. But when I got to
php bin/magento setup:upgrade
I have error message "Magento supports PHP 7.1.3 or later. Please read https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html". My website is on a shared server. The default PHP version is 7.1.27. so I supposed the PHP version shouldn't be the issue. I went into cPanel to change PHP version to 7.2.16 and the problem still persists.
Enter command "php bin/magento maintenance:disable" has the same error.
Any one can shed some lights please?
Solved! Go to Solution.
@WZ_OZES You may have to possibly run the PHP command with the version as well. Below is an example:
php71 bin/magento maintenance:disable
php72 bin/magento maintenance:disable
If above does not works you may possibly need to use complete path of PHP like below:
/usr/bin/php71 bin/magento maintenance:disable
/usr/bin/php72 bin/magento maintenance:disable
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.
@WZ_OZES You may have to possibly run the PHP command with the version as well. Below is an example:
php71 bin/magento maintenance:disable
php72 bin/magento maintenance:disable
If above does not works you may possibly need to use complete path of PHP like below:
/usr/bin/php71 bin/magento maintenance:disable
/usr/bin/php72 bin/magento maintenance:disable
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.
Thanks @Tarandeep Singh that works! Just for my knowledge, why I need to enter php command with version number now while before I didn't need to.
I have tried running
PHP bin/php72 bin/magento maintenance:disable
but I get this error: -bash: PHP: command not found
@sterg17In the command you mentioned PHP should be in lower case.
Yes. It was lower case. The issue actually was that I was testing on a subdomain that ran PHP7.2, but the main domain ran 7.0 - and for some reason magento was taking the parent domain when the website launched.
But when I checked the php version in the subdomain in SSH (php -v), it said 7.2. It also installed perfectly on the subdomain (which it would not have if php7.0 was running).
But for some reason, when the site launched, it took the parent domain php and not the subdomain php. I guess it would need some update in the htaccess file, but i just created a dummy domain account, and tested there and it all worked fine.
be careful with those subdomains!
commands will be like
php72 bin/magento cache:clean
php71 bin/magento cache:clean
or give full path to php on server
php bin/magento c:c
Magento supports PHP 7.1.3 or later. Please read https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html
on use putty command use so please help...