Debian 9 PHP version too old for Nextcloud 16

For php7.3-fpm

  1. sudo systemctl stop apache2

  2. sudo apt-get install php7.3-fpm

  3. sudo a2enmod proxy_fcgi setenvif

  4. sudo a2enconf php7.3-fpm

  5. sudo a2dismod php7.3

  6. sudo a2dismod mpm_prefork

  7. sudo a2enmod mpm_event

  8. sudo systemctl start apache2

1 Like

I recently tried to upgrade to PHP 7.3 using the deb.sury.org repo, following all the proper guides and installing all of the packages, as well as keeping the stable Debian 7.0 release. When I did this and changed to php7.3, I got a 500 server error, even after restarting the entire server. I tried then to go back to 7.0 and was still receiving the error.

I run Nginx, and not Apache, and would love if someone posted a guide to upgrade for Nginx, because a2dismod and enmod do not work for Nginx (as im sure most know). I have not been able to find a guide for anything other than Apache2.

Any help is appreciated here.

Just hold off on adding secondary repositories. It just creates problems down the road and opens up vulnerabilities. Debian 10 will be out soon and the issue will be solved.

to stay with old packages closes them?

the issue is a zombie and will appear in form of python 4 and php 8 soon.

https://docs.nextcloud.com/server/16/admin_manual/installation/nginx.html

I think you should post a new topic with logs etc. It will be easier to get help.

Agree the issue will just come up again with Debian. Not just here either, but with other software. Still sticking with Debian stable on servers though.

As to those concerned about the security of old Debian softwareā€¦Debian issues their own security fixes for software in stable almost as fast as Arch.

You might find this howto I wrote helpfulā€¦ https://tech.oeru.org/installing-nextcloud-and-collabora-office-online-docker-ubuntu-1604 Should work almost unchanged for Ubuntu 18.04 or Debian 9+ā€¦

Hello,

Not sure my 2 cents will matter, but I agree with schnappi, I stick with Debian 9 stable which has been serving me well over the years ā€¦ each attempt at upgrading PHP lead at some points to issues ā€¦ web servers by essence hosts many different things and a PHP upgrade can break stuff that you discover way later because you didnā€™t take the time to check each and every page of the 150 websites hosted on the machine.

I wonā€™t say Iā€™d prefer Debian to update more frequently, of course, but Iā€™m more annoyed by PHP updating their product at such a high pace and outdating very recent products ā€¦ I see still thousands of websites running PHP 5 ā€¦

Anyway, that was not the reason for my message: I just saw that I am suddenly offered to update NC to 16.0.3 (from 15.0.10), and I am still (as you might have guessed) on Debian 9 stable, ie PHP 7.0.33. Is there a place where I can check this, a place where it would be clearly stated that now NC 16 supports PHP 7.0.33 ? Updating to 16 was not an option as of a few days ago unless I am mistaken.

Thks.Pierre.

Nextcloud 16 requires PHP 7.1, 7.2 or 7.3
It will not work with PHP 7.0
https://docs.nextcloud.com/server/16/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

my playbook just told me:

TASK [prep_nextcloud : first setup nextcloud] **********************************************************************************************************
Monday 15 July 2019  19:44:12 +0000 (0:00:00.545)       0:07:08.123 ***********
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "php occ  maintenance:install  --database pgsql  --database-host \"localhost\"  --database-name nextcloud  --database-table-prefix oc_  --database-user nextcloud  --database-pass aKo3X56if2ehbtzQANhqvH4vQmqZ5EHf  --admin-user admin  --admin-pass XP6R4zT8J4VMHbLGZGkxNcWqBFYQaGi4  --data-dir /var/nc-data\n", "delta": "0:00:00.039882", "end": "2019-07-15 19:44:13.063709", "msg": "non-zero return code", "rc": 255, "start": "2019-07-15 19:44:13.023827", "stderr": "", "stderr_lines": [], "stdout": "This version of Nextcloud requires at least PHP 7.1<br/>You are currently running 7.0.33-8+ubuntu18.04.1+deb.sury.org+1. Please update your PHP version.", "stdout_lines": 
["This version of Nextcloud requires at least PHP 7.1
You are currently running 7.0.33-8+ubuntu18.04.1+deb.sury.org+1. Please update your PHP version."]}

should be the same on debian.

on the other hand: the playbook runs on debian 9 with php 7.3.7 without problems.

and nextcloud is using debian as the base image for there docker images.

i remember when half of the german internet was hosted on one sun fire 6500. guess why they use virtualization and container now. :wink:

Hello,

Sorry but I perfectly know about all this (requirements and warnings about running 7.0.33 and I already went to the documentation, thank you) and maybe my question was not phrased properly (english is not my main language)

I am suddenly et very recently proposed with upgrading to 16.0.3 (I was not before until I would say a week ago), so Iā€™m wondering if something changed (and that could explain the doc not being updated).
And if nothing changed I think itā€™s kind of dangerous to propose the upgrade, I know many people who will try and ā€¦ ooops. I guess that there are some limits and minimum requirements that have to be met for an installation to propose an upgrade, so I think itā€™s curious that I can now launch that upgrade ā€¦ maybe I will get some warnings later during the process (hopefully soon enough :slight_smile:

Anyway, maybe Iā€™ll try on a test install to see by myself.
Thanks.

i guess 16.0.3 is the ā€œproductionā€ release of nc16. so if you set your update channel to production it is offered to you. and yes, thatā€™s a bad bug.

tooltip:
grafik

my playbook could be helpfull. just install php 7.0 and nextcloud 15 and do the update manually.

Iā€™m just removing a Nextcloud from Debian because of the ā€œcrusty and oldā€ PHP issues. Mine is Debian 8 so Iā€™m in even more of a pinchā€¦Iā€™ve given up on Linux for old and stable. It stays stable, but way too old unless you backport or upgrade your OS. Save yourself some headache and learn FreeBSD. They have PHP 7.1, 7.2, and 7.3 in their ports and it actually isnā€™t a death march to upgrade between major and minor releases. Not a direct resolution to the problem, but once you go FreeBSD you donā€™t wanna go back.

Late answer, sorry.
Iā€™m on the ā€œstableā€ channel and each time there is a v15 update (letā€™s say 15.0.11 to 15.0.12), that update is offered to me, fine. But as soon as it is applied, I am again offered with a 16.0.4 update ā€¦ which gives me the impression that it is possible ā€¦ I know itā€™s not possible for me (still being PHP 7.0.33) but Iā€™m afraid somebody will do it ā€¦ anyway, moving soon onto Debian 10 :slight_smile:

Nowadays Debian 10 is stable release and Debian 9 became oldstable. Certainly, Debian 10.1 Buster provides everything out of the box to meet the Nextcloud server installation requirements. :shield:


There may be good reasons to use FreeBSD (including but not limited to being a U.S. citizen). However, there are good reasons to use Linux (including but not limited to being a EU citizen). :wink:

Unfortunately, one cannot ignore tribal aspects and any community effort can degrade into lost debates or other complex issues. Naturally, technical and deployment aspects should always matter most and you are free to choose.
:innocent:


The Debian project is a strong supporter of free software. :rocket:

Have a look at https://www.debian.org/

Please be aware of the Unattended Upgrades to keep the computer current with the latest security (and other) updates automatically. :gear:

IMHO there was never heard of a ā€œdeath march to upgradeā€ from the more conservative subset of the several Linux distributions or prove me wrong. Please note for a lasting time the consecutive updates and several migration to quite a bunch of machines (iron and/or VM) from Debian 8 and Debian 9 to the recent Debian 10 gave one no true hassle ever, if I may.

Hope this helps. :smiley:


Happy hacking. :+1:

1 Like

Which is why I recommend FreeBSD, because after 8 years of using Linux, I learned that in many ways, FreeBSD is technically more superior. And if you want to still stick with Linux, still abandon Debian for Devuanā€¦but you still fall into Linux pitfalls whether you agree or not. But, it all comes down to your use case. I personally will not recommend Linux for many use cases, some I most certainly will. For *EMP/*AMP stacks, I find FreeBSD the easiest to carry along over longer periods of time without having to deal with dangerous upgrades and difficult rollbacks. Plus the *EMP/*AMP stack has more current software than Debian. Also benchmarks have shown better performance on FreeBSD by large numbers because of how the CPU scheduler works.

Also disable Unattended Upgrades. Bad idea. Iā€™ve had it remove software and enable daemons quietly without my knowledge. Horrible for production environments.

That said, Iā€™ve been using Debian 10 since before its release and, apt, unattended upgrades, and systemd aside, itā€™s a good OS. CentOS is an even better alternative to Debian

Death march: Iā€™ve upgraded Linux from major release to major release enough times to have enough papercuts to conclude that you either fresh install or suffer with unintended consequences somewhere.

Much of what you said is subjective.

1 Like

@stratacast Ceterum censeo carthaginem esse delendam

This ā€˜superiorā€™ attitude could screw you, I presume.

Ad infinitum

You are free to choose. However, one has to pay for the lessons learned.

No offense but IMHO one should not fall into the easy trap of blaming others and certainly should not attack a sustainable open and free professional effort for the utter lessons of oneā€™s own apparently failed personal excercises, if I may. Learning is acknowledging oneā€™s failure to improve oneā€™s skills for the next endeavours, I presume.

Facta, non verba

Dude, what language are you speaking so I can Google translate it?

Please note currently Debian 10.2 Buster is out. Certainly, Debian 10 Buster provides everything out of the box to meet the Nextcloud server installation requirements .
:shield:

IMHO the goal should be a PHP 7.3 install. Please choose libapache2-mod-php7.3 over php-fpm as a home user certainly.
:safety_vest:


Why Apache2 with libapache2-mod-php7.3 but not NGINX and not php-fpm as a home user?

The NextCloudPi rationale could be worth a reading, although only deducted from Debian and not a standard system, I presume. Some background info and discussion were provided by the two posts of the same thread as was:

Hope this helps.
:nerd_face:


Happy hacking.
:sunflower: