OC detects wrong PHP version when upgrading

Environment: SharedHosting (MT)
Server: Apache
Database: mysql
PHP-Version: 5.5.35

Steps to reproduce:
Attempt to update via web interface to ownCloud 9.0.4.

Actual behaviour:
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'Could not parse a response for config:list --private. Please check if the current shell user can run occ command. Raw output: This version of ownCloud requires at least PHP 5.4.0 You are currently running 5.3.29. Please update your PHP version. ' in /mydomain/html/updater/src/Utils/OccRunner.php:59 Stack trace: #0 /mydomain/html/updater/src/Utils/ConfigReader.php(106): Owncloud\Updater\Utils\OccRunner->runJson('config:list --p...') #1 /mydomain/html/updater/src/Utils/ConfigReader.php(50): Owncloud\Updater\Utils\ConfigReader->load() #2 /mydomain/html/updater/src/Controller/IndexController.php(96): Owncloud\Updater\Utils\ConfigReader->init() #3 /mydomain/html/updater/src/Controller/IndexController.php(70): Owncloud\Updater\Controller\IndexController->isLoggedI in /mydomain/html/updater/src/Utils/OccRunner.php on line 59

I understand that Please check if the current shell user can run occ command that I dont have SU access and that is true, as this is a shared hosting. I can do the update manually.

What concerns me is the PHP version error.
How can it be that my web server is running PHP 5.5.35 but owncloud is detecting PHP 5.3.29?

I contacted MT support and they told me to manually specify the PHP path to /usr/bin/php-latest.
But as far as I know there is no option to specify php path in owncloud.

How does this work?


the check is using native PHP methods and can't be wrong. It is showing that the command line PHP version is 5.3 which you can't use with recent oC versions.

Please contact the support of your webhoster again and ask them to provide a current PHP version via command line at /usr/bin/php.

An alternative would be to do a manual update without the updater app.

Hello, thanks for your reply.

MT support tells me: The path to it over command line is /usr/bin/php-latest. More specifically, that is the symlink path. The exact path is /usr/local/php-5.5.35/bin/php.

Its evident that MT is assigning a path and owncloud is searching for another one.
Is there any way to point owncloud path to the one provided by MT?

The current version needs to be provided at /usr/bin/php or /usr/bin/php5 as already written above.