FS#56553 - [nextcloud] Not compatible with PHP 7.2"
Attached to Project:
Community Packages
Opened by Natanji (Natanji) - Sunday, 03 December 2017, 18:17 GMT
Last edited by Eli Schwartz (eschwartz) - Wednesday, 10 January 2018, 04:28 GMT
Opened by Natanji (Natanji) - Sunday, 03 December 2017, 18:17 GMT
Last edited by Eli Schwartz (eschwartz) - Wednesday, 10 January 2018, 04:28 GMT
|
Details
Description:
After upgrading php today, Nextcloud printed a message: "This version of Nextcloud is not compatible with PHP 7.2". Indeed this is a known upstream issue that will seemingly not be fixed, because 7.2 support will only come with Nextcloud 13: https://github.com/nextcloud/server/issues/6786 Since Nextcloud 13 is not yet available, the package needs to be updated with a requirement of php<7.2 such that any update of PHP on a machine is deferred until nextcloud 13 is available. Additional info: * package version: nextcloud 12.0.3-3 Steps to reproduce: * update php to 7.2 while nextcloud is installed |
This task depends upon
Closed by Eli Schwartz (eschwartz)
Wednesday, 10 January 2018, 04:28 GMT
Reason for closing: Fixed
Additional comments about closing: nextcloud 12.0.4-2
Wednesday, 10 January 2018, 04:28 GMT
Reason for closing: Fixed
Additional comments about closing: nextcloud 12.0.4-2
The beta apparently works with it. 12.0.4 does not.
However, I would refrain from patching this again, unless upstream says it's good.
However, I wrote a mail to arch-general to give a heads up, but it's not very likely, that all affected people will read it in time.
php 7.1.11-1
php-apache 7.1.11-1
php-gd 7.1.11-1
But when I try to start the httpd service (apache is installed), I get:
httpd[10228]: httpd: Syntax error on line 538 of /etc/httpd/conf/httpd.conf: Cannot load modules/libphp7.so into server: libicui18n.so.59: cannot open shared object file: No such file or directory
Downgrading apache to 2.4.28-1 (like before the php update) didn't help.
Or check /var/log/pacman.log for last update and downgrade all mentioned packages.
Note that, the latest php release makes php-mcrypt obsolete (virtual).
@eschwartz: Very unfortunate indeed. I nudged them on twitter for it, but I'll most likely write a bug report for it, if there isn't one yet.
pacman -Q | grep php
and downgraded all packages with php 7.2
DOWNGRADE_FROM_CACHE=0 downgrade php-7.1.12-2 php-apache-7.1.12-2 php-cgi-7.1.12-2 php-fpm-7.1.12-2 php-gd-7.1.12-2 php-intl-7.1.12-2 php-sqlite-7.1.12-2 php-xsl-7.1.12-2
and rebooted. Everything working again so far.
What I don't understand is why I can't pacman -Syu anymore now. After the downgrade of php, I should satisfy the new dependencies I called for. But it fails with "cannot satisfy dependencies, nextcloud requires php<7.2" despite php and associated php-* modules being on version 7.1.11-1. Is pacman not able to only upgrade packages that do not in some way depend on php?
Really, you should probably consider either running nextcloud-git or one of the billion old php packages in the AUR (you can make a php71 package, even). That way you will have both an upgraded system and a working nextcloud...
[1] https://github.com/nextcloud/server/issues/7384
Right now I have to choose between removing nextcloud, which I use regularly, or updating my system.
If we had known of this problem in advance, Arch would have only had to simply delay the php update until all software in the repositories is compatible with it. But since apparently nobody was informed of this in advance, this is no longer possible. Upstream not communicating their software's limits and requirements with downstream is always a problem and in this case, it led to this broken situation - which I'm not sure what to do about...
The best solution at this point would indeed be to add a php71 package, but not to the AUR: a [community] package such as this one must not depend on AUR packages. It would have to be added **to the official Arch repositories**, which is linked against the updated library binaries, and provides php. I'm not sure if that is against the philosophy of Arch though, but then again, there's both "python" and "python2" so why the hell not.
I know this additional work sucks, but I believe this is, at this point, the only way to fix this problem. To me it seems clear by now that upstream is not gonna lift a finger to fix this.
We have to make sure, that "infrastructure applications" (or however you might want to call them), such as nextcloud, are cross-checked _before_ php is updated in [extra].
Guess the only way to make sure, that this happens, is a) to add proper versioned depends for php to these applications (if you're actually able to find out what they are) and b) for Pierre Schmitz to check these depends and hold off on the upgrade.
@eschwartz: Could you add him to this bug?
This is a very valid point.
Since there is no clean solution, I'm forced to wait with any updated until we have a php71 package and dependency or the released nextcloud 13, whichever might come first.
Since the latter might take months, I would prefer to have the php71 package solution; or at least some clear instructions, how this could be done with the AUR packages without breaking the existing installation and keep it upgradable to future releases/allow to switch back to non-AUR package after nextcloud 13 has been released.
I think this package (nextcloud) should remain with stable versions only. In my case, I could upgrade my system by ignoring all php packages, i.e., by adding the following line to my /etc/pacman.conf file:
IgnorePkg = php php-apcu php-apcu-bc php-embed php-fpm php-gd php-intl
Once nextcloud 13 is released and it's safe to upgrade to php-7.2, the above line can be removed.
I hope it helps!
Could you also add Pierre Schmitz (the maintainer of php* packages) to assignees of this ticket? I think in the future, php should not be updated (or should be kept in [testing]) until a stable release of nextcloud is compatible.
It doesn't appear that there is any attempt to fix this in a point release, and the package has been broken (== cannot be newly installed and prevents system updates if already installed) for over a month.
Are nextcloud planning to release nextcloud 13 *very* soon? Because if not, we very much need to delete this from the repos until it is no longer utterly broken.
I think they should probably also provide php-whatever=7.1.13 as well, that way packages which already have a versioned dependency on php can seamlessly use this. It is easy to do with by adding the following to each split package function:
provides=("${pkgname/71/}=${pkgver}")
From /var/log/httpd/error_log:
[Tue Jan 09 21:55:53.268360 2018] [php7:error] [pid 1068] [client 192.168.1.1:54034] PHP Fatal error: Uncaught Doctrine\\DBAL\\DBALException: Failed to connect to the database: An exception occured in driver: could not find driver in /usr/share/webapps/nextcloud/lib/private/DB/Connection.php:61\nStack trace:\n#0 /usr/share/webapps/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\\DB\\Connection->connect()\n#1 /usr/share/webapps/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\\DBAL\\Connection->getDatabasePlatformVersion()\n#2 /usr/share/webapps/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\\DBAL\\Connection->detectDatabasePlatform()\n#3 /usr/share/webapps/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\\DBAL\\Connection->getDatabasePlatform()\n#4 /usr/share/webapps/nextcloud/lib/private/DB/Connection.php(148): Doctrine\\DBAL\\Connection->setTransactionIsolation(2)\n#5 /usr/share/webapps/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\\DB\\Connection->__construct(Array, Object in /usr/share/webapps/nextcloud/lib/private/DB/Connection.php on line 61
I'm using mysql (mariadb) as the nextcloud database. php71 or nextcloud issue?
*edit:
My bad, I missed this line in the pacman output:
warning: /etc/php/php.ini saved as /etc/php/php.ini.pacsave
moving php.ini.pacsave back to php.ini fixed the problem.