nextcloud 12.0.4 incompatible with php 7.2
Arch Linux, as a rolling release distribution, follows upstream closely, which is why php 7.2 has been adopted a few hours ago. This renders nextcloud (server) unusable for new installations of Arch Linux, while longer running installations theoretically still have the possibility to downgrade or not upgrade.
This is quite unfortunate, given the fact, that this is a feature release for php.
I'm aware of #6786, but I'd like to have an open bug for this, as this happened before with owncloud server and it would be nice to circumvent situations such as these in the future.
Steps to reproduce
- Install nextcloud on Arch Linux
Expected behaviour
Should work.
Actual behaviour
Is not compatible with php 7.2
Server configuration
Operating system: Arch Linux
Web server: Any
Database: Any
PHP version: 7.2
Nextcloud version: 12.0.4
Updated from an older Nextcloud/ownCloud or fresh install: Any
Where did you install Nextcloud from: Arch [community] repository
I nearly ran into the same problem. 45 minutes before my automatic update I checked what updates would come and saw PHP 7.2. I instantly stopped my automatic updates.
Nextcloud 13 seems to support 7.2: https://github.com/nextcloud/server/blob/185b6235bf755b8fd519c2a59ed72f8549658cb5/index.php#L36
and it should be released pretty soon, as it is already in Beta state.
Yes unfortunately the changes in php are not minor to make nextcloud 12 7.2 compatible.
indeed NC 13 will be compatible with php 7.2.
Compatibility with the current released version of the language should be top priority and released as soon as possible in a point release! Please don't put this off until the next feature release, my boxes have just all gotten borked and I'm forced to evaluate which other released software I can safely downgrade to get Nextcloud back.
Yes another release cycle is work, but it looks like 13 has huge feature set changes coming and might be held up testing for a while. PHP 7.2 compatibility should be ported to a 12.0.5 or 12.1 released ASAP.
@MorrisJobke I also don't get why you are closing this bug. It is an ongoing problem now.
I'm a bit stunned that you @MorrisJobke apparently are fine with Nextcloud 12 only working on systems that have not yet been updated to PHP 7.2, and just close this. This is a bug. Your software does not work with the most up to date version of PHP 7, despite you recommending PHP 7. In the coming weeks, many more systems will be updated. In the case of up to date distributions like Arch Linux, you effectively give users the option to completely uninstall Nextcloud or to not be able to update any of their packages anymore, including critical security patches. Please realize what situation you put users in.
What are the concrete things that even prevent this compatibility? The list of list of backward incompatible changes doesn't look like something that a lot would have to be rewritten for, only local code changes would have to be made - at least, unless you needed rand() or mt_rand() to return the same sequences for a given seed as before, even after the update to 7.2. Which sounds quite unlikely.
I understand the team is focussing on getting Nextcloud 13 out ASAP, but being willing to outright break your software - without even warning admins in advance! - just because you for some reason want to drop Nextcloud 12 like a hot potatoe after Nextcloud 13 is released? This is not the kind of behaviour one should expect from people who aim to have a stable cloud hosting solution.
there is still the php70 package :wink: Also this is exactly what "backwards incompatible change" means. Therefore you only should install the un-versioned php package, if you know what you are doing..
the 7.2 issues are all mcrypt related, right?
while it is true that mcrypt was removed from php-core, it is still available as a pecl extension, with 7.2 (and git master) support, see https://pecl.php.net/package/mcrypt
... that said, whatever mcrypt features you're using should have been ported to OpenSSL a long time ago.
@MorrisJobke So when exactly is 13 getting released? I cannot run any updates on my server unless I remove nextcloud. If 13 isn't ready, any chance you could just patch NC 12 to run with the current php package? This is a huge breaking issue
@CountMurphy pretty sure all you have to do is install mcrypt, see above (i can't actually test it now though)
Hi,
As mentioned above, I'm affected as well by this problem. However I do understand the developers. There are new futures to develop, bugs to fix and now adapting the whole code to changes of certain tools (apache/ nginx, php, ...) is very time consuming. I also understand that there are list of supported software versions for a reason. As far as I know Arch Linux is not even a supported OS - very likely because it is a rolling release and this are the problems that happen then. My impression is, that the developers are anything but lazy and that they do everything they can to have a good mix of release-cycles, new features, support of older releases and there are many backports of bug fixes.
Okay, looking for solutions... What I can suggest is to simply exclude php updates from your regular system updates. I added the following lines to /etc/pacman.conf:
IgnorePkg =php
IgnorePkg =php-fpm
IgnorePkg =php-gd
IgnorePkg =php-intl
While I am not very sure about the packages php-apcu (would be updated to php-apcu-5.1.8-2) and php-memcache (would be updated to php-memcache-3.0.8-6) and their dependencies, I excluded them as well:
IgnorePkg =php-apcu
IgnorePkg =php-memcache
No I can run my daily updates without any worries again. So the main problem with security updates is solved. (Sure if PHP is already updated, it's a bad situation and a downgrade is necessary first) Starting with Nextcloud 13 I will comment these entries again.
Hope it helps to relax the situation a little bit.
@Schmuuu That doesn't actually work and your setup will most probably stop working after a reboot. This is because php and associated packages depend on libraries that are also used elsewhere in the system. Some libraries have received updates in the meantime, which means their Sonames have changed (as they must). The php 7.1 package is still linked against the older versions of the libraries, not the newer ones.
The only reason your setup works at the moment is probably because the old .so files are still loaded by your system. I expect your system to break upon next boot; for me it did at least, and I had to manually downgrade some libraries (and their dependencies... and their dependencies... etc.) to get it working, for instance the icu package. And this downgrade might well break other software now (just haven't noticed it yet), because of course all other software in Arch that depends on the same libraries is now linked against the newer version of said libraries, which it won't be able to find unless I update them (wherupon php will break again). Of course, this situation is only going to get worse over time as more libraries that the old php version depends on are updated. Rolling release distros cannot really support partial updates of your system, and Arch is no exception.
So no, I don't find this relaxing at all. Even if Arch is not an officially supported distribution (and thus Nextcloud can't be expected to do any code changes in advance to fix this limitation - I agree there), at least communicating a known breaking change in advance to package maintainers is something that should be expected in the Open Source world!
If this change was communicated downstream, it would be easy to write "yup folks, we knew this limitation, we DID communicate this, but your distro didn't bother. You broke it, you have to fix it". Since this was just closed without comment instead, this seems to me like they did not communicate this dependence on php<7.2 despite knowledge of the problem and ample time to do so. This means they are at fault for breaking this, and as such they should fix it.
Yes, this means much more work now - which could have been easily prevented by warning distributions/package maintainers...
I'm faced with the same situation @Natanji described (reverted to several previous PHP releases (php, php-gd, etc., but that did not ressurect Nextcloud).
I'm considering uninstalling Nextcloud so that I can update my Arch system.
Does anyone know if uninstalling Nextcloud will remove all my settings/customizations (calendars, etc.)?
What a mess... but I suppose I'm getting what I paid for.
Is there a particular reason that backporting the php72 fixes to some nextcloud 12.0.5 maintenance release is not feasible? Failing that, can the specific backports (including modifications) needed for nextcloud 12.0.4 be identified in order to apply the backport downstream as an interim measure? I ask because from the sound of things, backporting those fixes is non-trivial without pulling in lots of nextcloud 13 changes.
@paroj Arch Linux does not provide old versions of software in parallel to current versions, therefore there is no php70 package. In theory, the nextcloud maintainer could provide a php71 package just for nextcloud 12, but that might be issueful with the main php package, and also sort of defeats the purpose of having up-to-date software to begin with. (We do not package php 7.2 just for the fun of it, new versions tend to fix broken things and contain security fixes in addition to adding new features....) This is in addition to of course being rather messy.
php7.2 is clearly marked as backwards incompatible, so you can not just upgrade and expect depending stuff to work. Furthermore as you can see here PHP has always two supported releases in parallel. So currently php7.1 is still up to date software. If arch does not properly reflect this, it is an issue with arch really.
@eli-schwartz a quick search on google gave me the arch wiki page on PHP which mentions AUR for older versions. Probably for situations like this. Going there I find: https://aur.archlinux.org/packages/php70/
seems like the arch users here are much better at crying then at using google.
Aur packages aren't official. I think thats what eli meant when he said Arch Linux does not provide old versions of software.
@CountMurphy It most certainly was what I meant.
@paroj I daresay I know that quite well.
But anyway, according to that blanket logic php5.6 is also supported... Arch Linux updates to the latest version of current, stable software and does not provide old-but-still-supported software as a general rule. Nextcloud is nowhere near the only php based package in our repos, not to mention the fact that the AUR etc. runs on php... we value using the latest stable release of php when deploying our own infrastructure more than we value staying on older versions for the sake of one package in our repos.
If the official upstream response to this incident is "use an AUR package", then that means nextcloud depends on an AUR package... and we cannot have repository packages that depend on AUR packages. Sure, users can get both php70 and nextcloud from the AUR, but wouldn't it be nice if we didn't have to delete nextcloud from the repos
@paroj: Just because the previous version is still supported (aka receiving security patches) by PHP, doesn't mean it is up to date. Of course you are right that one cannot upgrade and just expect things to work; but it's completely unrealistic for the php maintainer to check if every single package that depends on php still works after the update. This is why in the FOSS world, if upstream knows that their software will break with an up to date version, they will notify maintainers in advance. It's a tried concept and if you want to be taken seriously as a FOSS developer, as I'd hope Nextcloud GmbH wants to be, then you need to communicate this. There really is no other realistic way.
What I will agree with you about is that php7.1 will still be officially supported for another year, meaning that Arch getting a php71 package to fix this problem is an option. (Having a package that is no longer supported by the developers in the official repositories would not be one I think, especially for internet-exposed services that need security updates). I have proposed that the maintainer in Arch does this. I'd still much rather like Nextcloud to fix this upstream, since PHP 7.2 will eventually hit other distributions.
Come on, PHP 7.2 is six days old at the time as I write this!
@saper: The release is, yes - the last beta (of which there were 3!) was available in August. So there was a total of FOUR MONTHS in which this could have been fixed. Despite this, people already noticed this bug in early October as by #6786. This proves that Nextcloud developers were 100% aware of this bug TWO MONTHS AGO and did... precisely nothing about it. Like, no reaction at all, not even warning anyone. Just closing the bug and acting like there's nothing to do.
@Natanji this is not NextCloud's fault if they decide to not to rush to fix this in the minor release, especially given the fix is non trivial. The moving part here is PHP, not Nextcloud. Nextcloud DID NOT change when you have updated your server. PHP did.
If you really really want to blame someone, please talk to the PHP package maintainer of your system who might need some help in figuring out regression testing with other packages.
I've seen other apps break when the engine updates (MediaWiki on most major PHP updates, binary node modules like https://github.com/sass/node-sass breaking with almost every nodejs update) and it is unreasonable for maintainer to provide compatibility with the latest and greatest on the first day. It is system's administrator ultimate responsibility to check if the system is ready to move from important engine version A to version B.
[edit] link to the over-the-top reaction on mastodon removed