core icon indicating copy to clipboard operation
core copied to clipboard

PHP 8.0

Open jonathanmassehsj opened this issue 3 years ago • 1 comments

Our IT team installed PHP 8.0 due to PHP 7.4 is going to be deprecated soon.

All our projets is running fine on PHP 8.0 except owncloud.

We have the latest version of owncloud 10.0.10 and we have an error : PHP 8.0 is not supported.

Is there something we can do?

I asked the IT team to put back PHP 7.4 but for security reason they only offer PHP 8.0 or 8.1 to be installed.

Many thanks for your help,

jonathanmassehsj avatar Jul 26 '22 14:07 jonathanmassehsj

Unfortunately, PHP 8.x is currently not supported but we are already working on that direction to make this soon happen.

pako81 avatar Aug 04 '22 11:08 pako81

Soon? I'm kind of speechless...

holzfuss avatar Sep 28 '22 14:09 holzfuss

Why speechless? Things time taking...

Also work ongoing by them: #40324, #40354, #40127

ho4ho avatar Oct 01 '22 13:10 ho4ho

Speechless because the PHP 8 transition has been a long time coming. So, by now, almost everyone has already invested the time to make their software work with PHP 8.

sorenstoutner avatar Oct 05 '22 20:10 sorenstoutner

Thinking they not having rush:

  • Debian 10: PHP 7.3 support by June 30th, 2024
  • Debian 11: PHP 7.4 support by roughly June, 2026
  • SLES 12: PHP 7.2 support by 31 Oct 2027
  • SLES 15: PHP 7.4 support by 31 Jul 2031

Others probably similar by support. Also support newer PHP vers thinking means dropping support older PHP vers. Also user complaint in the past by them (ownCloud) needing too new PHP vers, no complaining needing not new PHP :-/

ho4ho avatar Oct 14 '22 14:10 ho4ho

PHP will stop supporting 7.4 on 28 Nov 2022

https://www.php.net/supported-versions.php

jonathanmassehsj avatar Oct 14 '22 14:10 jonathanmassehsj

Not meaning PHP is not supporting by Linux distributions (Debian and others) anymore, thinking misunderstanding here.

Example PHP 7.3 still supported by Debian, SLES, Ubuntu LTS by many more.

ho4ho avatar Oct 14 '22 14:10 ho4ho

  1. It is possible for a program to support PHP 8.0+ and PHP 7.4 simultaneously. Every service that I run except ownCloud already does that.

  2. Debian testing (the distribution that runs my ownCloud server) has already dropped PHP 7.4. This is because upstream security support for PHP 7.4 is ending 28 November 2022 as noted in the link posted two comments before this one. Distributions often try to support PHP after the upstream EOL, but they are not always able to provide as good of security support on their own. The dates posted three comments above for PHP 7.3 and 7.4 support in Debian are describing the oldstable distribution, which for both security and feature reasons are not an acceptable base for most people to run production servers.

  3. My current options running Debian testing are to run ownCloud with the latest version of PHP 7.4 that was packaged for Debian testing, which already don't have the latest security updates for PHP 7.4 because they are not being maintained; stop using ownCloud; or switch to Nextcloud (which already has PHP 8.0+ support, recommending PHP 8.1, while still supporting PHP 7.4).

  4. Debian testing will begin the freeze process on 23 January 2023. That process will culminate in the release of the next version of Debian stable, codename Bookworm, which will not include PHP 7.4. From that point forward, the only way to run PHP 7.4 on Debian will be to run oldstable, which, again, is not a place many system admins want, or can afford, to be, either from a security or a feature perspective.

  5. Based on the comments in this bug report, I am not the only person who considers ownCloud being late to the PHP 8.0+ game to be a problem.

sorenstoutner avatar Oct 14 '22 15:10 sorenstoutner

Understanding parts (also only talking by me personal, nothing to do with ownCloud by me).

Still not sure if running ownCloud by "testing" unstable distro is good idea, better choose stable distro.

Also see supported systems by them:

https://doc.owncloud.com/server/10.11/admin_manual/installation/system_requirements.html#server

As support by ownCloud by supporting PHP 8.0 already going on by ownCloud by some months (linking above) thinking nothing else by discussion needed.

ho4ho avatar Oct 14 '22 15:10 ho4ho

Still thinking something could be said by ownCloud officials on reasons (e.g. could be reasons why PHP 8.0 not supported because would drop other support needing to be provided by ownCloud?).

ho4ho avatar Oct 14 '22 15:10 ho4ho

The reason why ownCloud doesn't already support PHP 8.0 is because they wanted to discontinue ownCloud and move everyone to Infinite Scale before the PHP 8.0 transition happened (so the original plan was that ownCloud would never support PHP 8.0). However, that didn't work out, and now they are behind the eight ball having to rush to add PHP 8.0 support because Infinite Scale is running way behind their originally anticipated schedule.

sorenstoutner avatar Oct 14 '22 16:10 sorenstoutner

Still not sure if running ownCloud by "testing" unstable distro is good idea, better choose stable distro.

Most people are not very familiar with Debian and get confused by the word "testing". Testing is just the rolling release version of Debian. I would consider it to be as production-ready as many other "stable" Linux distributions, and particularly more stable than any other rolling Linux release. As such, there is a lot of the internet that runs on Debian testing.

sorenstoutner avatar Oct 14 '22 16:10 sorenstoutner

The reason why ownCloud doesn't already support PHP 8.0 is because they wanted to discontinue ownCloud and move everyone to Infinite Scale before the PHP 8.0 transition happened (so the original plan was that ownCloud would never support PHP 8.0). However, that didn't work out, and now they are behind the eight ball having to rush to add PHP 8.0 support because Infinite Scale is running way behind their originally anticipated schedule.

Having any background to this of origin of this (would be interesting by me)?

ho4ho avatar Oct 14 '22 17:10 ho4ho

You can read a little about it here:

https://central.owncloud.org/t/owncloud-development-roadmap-future-of-owncloud-classic-versus-ocis/37633

Note that, as recent as 17 May 2022, "there are no plans to start working on PHP8 support". Woops! It was that lack of plans to support PHP 8.0 in favor of switching everyone to Infinite Scale (which does not use PHP) that put ownCloud behind the rest of the entire technical world. As you can see, ownCloud has reevaluated that decision and is now rushing to add PHP 8.0+ support.

The three bug reports listed in the fourth comment of this thread were opened in June, August, and September. That represents when ownCloud began working on PHP 8.0+ support.

sorenstoutner avatar Oct 14 '22 17:10 sorenstoutner

Not knowing if really rushing, by topic above by May 2022:

Even after the end of support upstream of PHP, there will be maintained versions of PHP 7.4 around from various distros. That should give plenty of time.

PHP 8.0 support starting working by #38094 by Nov 2020 looking like but closed by Dec 2021 without reasoning.

ho4ho avatar Oct 14 '22 18:10 ho4ho

That link is about deprecating PHP 7.2 and beginning work on PHP 8.0 at the same time. This was when everyone else started adding PHP 8.0 support to their programs, which is why they have all finished the process.

However, it was about this time that ownCloud decided they would never support PHP 8.0 and migrate everyone to Infinite Scale instead. Which would have been fine if they had gotten Infinite Scale ready in time. That was why that bug report was closed without any appreciable work being done on PHP 8.0 compatibility.

I think it is good that ownCloud has changed their mind and are now working on PHP 8.0 compatibility. I have been following this issue for quite some time and in my opinion that was always the obvious decision. I just wished they had come to that realization sooner and finished the migration before PHP 7.4 was removed from Debian testing.

sorenstoutner avatar Oct 14 '22 21:10 sorenstoutner

Maybe true maybe not true maybe because Ubuntu 22.04 LTS having PHP 8.1 reason (supporting requested by customer paying?).

Thinking currently only speculation.

ho4ho avatar Oct 15 '22 07:10 ho4ho

@sorenstoutner Yes. This. Exactly. I posted about this on their forum like 3months ago and got hit with "use the form search, no support planned", mind you, in reply to a topic that I Found about php8 update (or lack thereof) using the aforementioned search. The fact that they do not have a PHP8 support build in at least RC status by this point is a huge red flag for me. Luckily I'm not heavily invested in this software. Reading this topic is all I need to see to know "jumping ship" while I'm still near shore is my best course of action.

RickKukiela avatar Nov 14 '22 19:11 RickKukiela

I posted about this on their forum like 3months ago and got hit with "use the form search, no support planned", mind you, in reply to a topic that I Found about php8 update (or lack thereof) using the aforementioned search.

https://central.owncloud.org/t/trouble-with-php-version/38889/12 only answer by user by forum, not answer by ownCloud member. User can writing everything to their liking :man_shrugging:

ho4ho avatar Nov 14 '22 20:11 ho4ho

@pako81 PHP 7.4 is end of life in less than two weeks. What is the official recommendation for the various Linux distributions to keep a safe PHP 7.4 environment?

cortho avatar Nov 15 '22 14:11 cortho

The official recommendation is to stop using PHP 7.4. Active development on PHP 7.4 ended on 28 November 2021. Security support was maintained for an additional year to allow everyone to transition away from it.

https://www.php.net/supported-versions.php

Some distributions might try to maintain security support themselves by fixing any flaws that are discovered in the codebase. However, that type of support is likely to be incomplete and is not recommended for anything exposed to the open internet.

sorenstoutner avatar Nov 16 '22 18:11 sorenstoutner

Any news on php8 support?

adamedia-de avatar Nov 24 '22 06:11 adamedia-de

@pako81 PHP 7.4 is end of life in less than two weeks. What is the official recommendation for the various Linux distributions to keep a safe PHP 7.4 environment?

@cortho We are providing additional support for php7.4 to all our customers like you.

Thomas, try oCis, the product is installable in a few steps, fast, and reliable. you will really enjoy it, give me a call if you have some questions ;)

cdamken avatar Nov 24 '22 15:11 cdamken

@pako81 PHP 7.4 is end of life in less than two weeks. What is the official recommendation for the various Linux distributions to keep a safe PHP 7.4 environment?

@cortho We are providing additional support for php7.4 to all our customers like you.

Thomas, try oCis, the product is installable in a few steps, fast, and reliable. you will really enjoy it, give me a call if you have some questions ;)

That seems like a wild suggestion at the current stage. The oCis docs are full of todos, and leave the impression, that I should not use this in production, especially not for instances, that are used by a bunch of users.

If that is how users are treated, I guess it means I made the wrong decision in sticking with owncloud.

I wonder if there are still any options out there to migrate a current owncloud instance to nextcloud?

Morl99 avatar Nov 24 '22 21:11 Morl99

The worst is the official ignorance of that issue. If it is true, that there are over 200 000 000 owncloud users out there - like the website suggest - how can there be such an absence of information on the website? Where are the quite 200 millions? Maybe the 200 are part of the slow motion. Taking a closer look at the changelog one can see that it has always taken a while for ownCloud to move to newer PHP versions and reject the outdated. And there are some voices out there in the forums promising that owncloud will stay with us in the next 3 years ... take a deep breath and ommm folks... ;-)

adamedia-de avatar Nov 25 '22 00:11 adamedia-de

@cortho We are providing additional support for php7.4 to all our customers like you.

Is this an official indication that ownCloud will never support PHP8? I've been patiently waiting, but if it's never going to come, I suppose I should just migrate to Nextcloud...

I wonder if there are still any options out there to migrate a current owncloud instance to nextcloud?

I'm unfortunately now wondering the same..

jingai avatar Nov 25 '22 01:11 jingai

It looks like nextcloud still tries to maintain updateability from owncloud, see: https://docs.nextcloud.com/server/latest/admin_manual/maintenance/migrating_owncloud.html

I will give that a try on a test instance.

Morl99 avatar Nov 25 '22 15:11 Morl99

This issue is discussing several points, first ownCloud Infinite Scale has just reached release candidate 2 and will be ready for production when our QA finds no further issues. Second, we recommend to first and foremost use our docker container which will always provide a maintained and secure PHP to run ownCloud 10. Third, none of the 200 million users should worry which PHP version is behind the ownCloud server but we understand that all administrators should worry and therefor we provide clear recommendations to use our Docker image or use Ubuntu 20.04 (April 2025) or other operating systems which will continue to provide PHP 7.4 support. There are also other extented support capabilities available from a variety of vendors, we have contracted with them to be sure that we deliver a maintained and secured version now and in the future. As usual we have the next version ownCloud 10.12 in the works.

hodyroff avatar Nov 25 '22 18:11 hodyroff

Closing here as the original question is answered, PHP 7.4 is secure and maintained from the sources above or here: Freexian is offering a PHP 7.4 LTS Service: PHP LTS by Freexian | Freexian

Zend is offering support for PHP 7.4 for a variety of Linux distributions, including a trial: Try ZendPHP Enterprise | Zend

For hosting customers Ionos is making PHP 7.4 available: PHP7 Hosting | Jetzt die neueste PHP Version testen | IONOS

Known to include maintenance for PHP 7.4 are (will try to make this list more complete):

Ubuntu 20.04 will provide maintenance for PHP 7.4 till at least April 2025.

Red Hat Enterprise Linux 7 and compatible Linux distributions

SUSE Linux Enterprise Server 12 and 15

hodyroff avatar Nov 25 '22 18:11 hodyroff

In terms of debian (and therefore ubuntu) here's what their notes on php and security say:

In short, security support for PHP places a high load on the package maintainers, because of the volume of security-related issues and the difficulty of working with the upstream authors in finding the fixes. As such, PHP security issues are typically triaged with different priorities based on the particulars of the issue.

  • issues involving features that are broken as designed (safe mode, register globals, etc) are completely ignored
  • issues that require a malicious local user (unless there are compelling reasons otherwise) are ignored.
  • issues involving unsafe application usage (applications not filtering input before passing to certain functions) are usually given a low priority or sometimes even ignored in favor of reporting bugs against the offending applications
  • issues involving remote code execution (buffer overflows, code inclusion, etc) are given the highest priority

debluxe avatar Nov 26 '22 09:11 debluxe

This is the core of the problem. Just because a Linux distribution maintains support for a long-term release, it does not mean that they maintain full security support for every single package in that long-term release that is no longer maintained by their respective upstreams. This is particularly painful in the case of PHP, so much so that Debian (and hence Ubuntu) have a written disclaimer.

sorenstoutner avatar Nov 26 '22 17:11 sorenstoutner

Why has this issue been closed? Should I interpret this as "PHP 8 is already on the queue" or "ownCloud will not come for PHP 8" I guess all this confusion here comes from no clear answers until now.

cortho avatar Nov 28 '22 11:11 cortho

Why has this issue been closed? Should I interpret this as "PHP 8 is already on the queue" or "ownCloud will not come for PHP 8"

I guess all this confusion here comes from no clear answers until now.

I interpret it as: Won't fix

Fortunately, Nextcloud just recently worked on the OwnCloud migration, so the switch to Nextcloud from the most current OwnCloud version should be possible.

Morl99 avatar Nov 29 '22 22:11 Morl99

https://github.com/owncloud/ocis GA was released today - you might wanna check that as an alternative.

dragotin avatar Nov 30 '22 17:11 dragotin

https://central.owncloud.org/t/announcement-owncloud-10-and-php-versions/40251 hopefully provides all the answers. Thanks for the hints towards the Debian policy. We will certainly watch any items which will be relevant for ownCloud as an application!

hodyroff avatar Dec 02 '22 19:12 hodyroff

It took me about one hour to get ownCloud working with PHP 8 (fies, sharing, settings are working, haven't tested more than that, also MySQL installation is broken but upgrading from an existing setup works, as well as SQLite), if anyone is interested, feel free to use this, fork it and do more stuff: https://github.com/bohwaz/owncloud-core-php8

bohwaz avatar Aug 25 '23 07:08 bohwaz

Congrats - you managed to do a fraction of the work an claim :

image

There is much more to do then these few code changes.

DeepDiver1975 avatar Aug 25 '23 10:08 DeepDiver1975

For example, console.php also needs to change. I found other places that the fixes to usort and explode/strpos/etc need to be changed. So it needs a full pass through all the functionality (and for using LDAP there are bigger changes to do...)

But yes, a lot of the base functionality of a "default" installation does seem to work OK.

phil-davis avatar Aug 25 '23 10:08 phil-davis

As I said, this is not meant to be a complete adaptation, it's just that 90% of the core functionality works with just one hour of work.

I worked on much larger code bases before, I know how migrations work, and how much work can be involved. I think that most of the code could be transitioned to PHP 8 in a week by an ownCloud developer, which is not that much money in the end.

But I'm not a user of ownCloud, I just wanted to try it on my laptop to do a quick benchmark. Anyone wanting to use ownCloud on PHP 8.0 can use my work and continue if they want, that's just my message: it could be done, it doesn't take a lot of effort. This is not a 6 month, 20 people full time, project.

bohwaz avatar Aug 25 '23 11:08 bohwaz