FS#69464 - [nextcloud] occ utility uses PHP 8 instead of PHP 7 and thus fails version check
Attached to Project:
Community Packages
Opened by rio (rio) - Friday, 29 January 2021, 09:55 GMT
Last edited by David Runge (dvzrv) - Saturday, 20 February 2021, 11:13 GMT
Opened by rio (rio) - Friday, 29 January 2021, 09:55 GMT
Last edited by David Runge (dvzrv) - Saturday, 20 February 2021, 11:13 GMT
|
Details
Description:
While the nextcloud packages have been changed to depend on the new php7 packages during migration to PHP 8, the occ script still has the following shebang: #!/usr/bin/env php Thus, for users with php 8 installed, this will run occ using php 8 instead of php7, which fails the version check. Users are only able to use occ after changing php to php7 in the shebang. Additional info: * nextcloud 20.0.6-1 |
This task depends upon
Closed by David Runge (dvzrv)
Saturday, 20 February 2021, 11:13 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed with nextcloud >= 21.0.0-2
Saturday, 20 February 2021, 11:13 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed with nextcloud >= 21.0.0-2
* nextcloud 20.0.6-1
I have noticed though that the scripts in aur/nextcloud-systemd-timers are not using php7 either. (Checked again, they are using php7 now.)
sudo /usr/bin/runuser -u http -- /usr/bin/php7 -d memory_limit=1024M /usr/share/webapps/nextcloud/occ upgrade
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: could not find driver in /usr/share/webapps/nextcloud/lib/private/DB/Connection.php:72
Stack trace:
#0 /usr/share/webapps/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1449): OC\DB\Connection->connect()
#1 /usr/share/webapps/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(892): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /usr/share/webapps/nextcloud/lib/private/DB/Connection.php(202): Doctrine\DBAL\Connection->executeQuery()
#3 /usr/share/webapps/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(206): OC\DB\Connection->executeQuery()
#4 /usr/share/webapps/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(217): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /usr/share/webapps/nextcloud/lib/private/AppConfig.php(345): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /usr/share/webapps/nextcloud/lib/private/AppConfig.php(110): OC\AppConfig->loadConfigValues()
#7 /usr/share/webapps/nextcloud/lib/private/AppConfig.php(301): OC\AppConfig->getApps()
#8 /usr/share/webapps/nextcloud/lib/private/legacy/OC_App.php(949): OC\AppConfig->getValues()
#9 /usr/share/webapps/nextcloud/lib/private/Server.php(668): OC_App::getAppVersions()
#10 /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}()
#11 /usr/share/webapps/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#12 /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#13 /usr/share/webapps/nextcloud/lib/private/ServerContainer.php(156): OC\AppFramework\Utility\SimpleContainer->query()
#14 /usr/share/webapps/nextcloud/lib/private/Server.php(1677): OC\ServerContainer->query()
#15 /usr/share/webapps/nextcloud/lib/private/Server.php(1017): OC\Server->getMemCacheFactory()
#16 /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}()
#17 /usr/share/webapps/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#18 /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#19 /usr/share/webapps/nextcloud/lib/private/ServerContainer.php(156): OC\AppFramework\Utility\SimpleContainer->query()
#20 /usr/share/webapps/nextcloud/lib/private/Server.php(1977): OC\ServerContainer->query()
#21 /usr/share/webapps/nextcloud/lib/private/Files/View.php(118): OC\Server->getLockingProvider()
#22 /usr/share/webapps/nextcloud/lib/private/Server.php(395): OC\Files\View->__construct()
#23 /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}()
#24 /usr/share/webapps/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#25 /usr/share/webapps/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#26 /usr/share/webapps/nextcloud/lib/private/ServerContainer.php(156): OC\AppFramework\Utility\SimpleContainer->query()
#27 /usr/share/webapps/nextcloud/lib/private/Server.php(1324): OC\ServerContainer->query()
#28 /usr/share/webapps/nextcloud/lib/base.php(595): OC\Server->boot()
#29 /usr/share/webapps/nextcloud/lib/base.php(1091): OC::init()
#30 /usr/share/webapps/nextcloud/console.php(49): require_once('/usr/share/weba...')
#31 /usr/share/webapps/nextcloud/occ(11): require_once('/usr/share/weba...')
#32 {main}%
Got it working after setting the configs and updating nginx conf to use php-fpm7 and updating cron.
It allows overriding of php.ini, php command and user and thus should be able to allow us to get around patches of the occ command in the future.