I ran in an issue where the command line commands for occ would claim it was was for command line only like it could not detect that php-cli was active.
I had to comment out lines 69 to 72 in console.php.
if (!OC::$CLI) {
echo "This script can be run from the command line only" . PHP_EOL;
exit(1);
}
With that commented out the commands would run without error.
Also, after the upgrade. It all seems to work well. I do see a few files have not passed the integrity check.
for this i have grepped through my own ownCloud installation and found the following:
It seems ownCloud is evaluating the return value of the php_sapi_name() function to determine if the occ command line tool is running in CLI mode and on your environment this function doesn’t return either cli or phpdbg as expected by ownCloud.
It looks to me that this is a problem in your specific environment, maybe you can test this on your own to see what your php command line binary is returning via:
i’m not that familiar with different linux environments but it looks to me indeed that a different php environment/binary is used depending on the user (root = correct PHP cli binary, www-data = web server binary, not the expected cli binary) in relation of the use via sudo.
At this point, we have now worked through what process I need to take in order to have the upgrade operations to function correctly. My system seems to be a little different than a stock Centos 7 install.
I’m running this on a cPanel server with current cPanel running on Centos 7.