Problems with nextcloud and PHP 8

Hi - somewhat late to this party … so hope this is the correct place to ask. I have Nextcloud and the excellent password module for it installed (although for all I know, it could be sending my passwords to the russian mafia). Password has been telling me I need to upgrade my PHP version.

I have made a virtual host and set it to install and use PHP 8.0. Then I modified the Nextcloud template to use PHP 8.0. Now I am getting some errors. I don’t think they are bugs - just I cannot find out how to do stuff. I can post them seperatly if they are not the result of gross stupidity.

First problem - I added the line

SetHandler "proxy:unix:/var/run/rh-php80-php-fpm/7b8718f8dd5c875-php80.sock|fcgi://localhost"

to the template and it is now in my zz_nextcloud.conf file, where the 7b8718f8dd5c875-php80.sock file is used by the virtual host.

I tried

SetHandler "proxy:unix:/var/run/rh-php80-php-fpm/nethserver-nextcloud-php80.sock|fcgi://localhost"

and restarted, then rebooted, but the socket is not created. Is there some way to get apache/php to create the socket?

Second problem.
When I go to the Administration → Overview page in Nextcloud, I get

This instance is missing some recommended PHP modules. For improved performance and better 
compatibility it is highly recommended to install them.
gmp
imagick
sodium

Is there a way to install these modules? When I try

yum yum list available | grep php

I don’t get results for php 8 - php8 etc Is there a repository I need to enable? Or something else?

Third problem
When I go to

PHP 7.3.29 is no longer supported. [Please check the system requirements.](https://git.mdns.eu/nextcloud/passwords/wikis/Administrators/System-Requirements)

The last background job was executed with PHP 7.3.29, but the webserver uses PHP 8.0.10. Using different major versions of PHP may cause issues.

Oh. Well - seems I can run the cron job manually now. Was not working before … oh well.

Anyway - using

 crontab -u apache -l 
 no crontab for apache

I found a file nextcloud in /etc/cron.d/ that contains

*/5 * * * *   apache /usr/bin/scl enable rh-php73 -- php -d memory_limit=512M -d apc.enable_cli=1 -f /usr/share/nextcloud/cron.php

I changed the ownership of the cron.php file and can run it with

php80 -d memory_limit=512M -d apc.enable_cli=1 -f /usr/share/nextcloud/cron.php

But I am not sure if I can just edit the cron.d/nextcloud file directly (or I guess, a template in /etc/e-smith) and what to do with the /usr/bin/scl enable rh-php73 part.

Well, about it. I guess these are Nethserver configuration issues. I have done some searches but haven’t found a solution to my problems. Hope someone here can help :slight_smile:

https://docs.nextcloud.com/server/latest/admin_manual/installation/system_requirements.html

PHP73 is still good.

Could you try to use the last version the nethserver-nextcloud 1.19 (nextcloud 22.2.0) and check if the warning is still present because nextcloud got a bug and was looking after a library not available in PHP73

php73 is good for a basic installation of nextcloud.
the password app is asking for php8 and was asking for php7.4 with nexcloud 21.
php8 is the recommended version so i think this the right moment for an upgrade.

Well, trying again to sort out the php issues. Both Nextcloud and the Password app reccomend php 8. Nextcloud does support 7.3 and 7.4. The password app says the minimum it supports is 7.4. As far as I can tell, Nethserver only supports 7.3. PHP support for php 7.3 ended nearly a year ago, and 7.4 support ended 5 days ago. That means we as close to the end of PHP support for version 8.0 as we are to the ending of support for Nethservers version of PHP.

Don’t want to be rude here - I apreciate all the work that goes into Nethserver - but Nextcloud matters to me more than Nethserver. I like having Acitve Directory servers and the other stuff I have set up, but I don’t really need it. Nextcloud generally, and Nextcloud Passwords specifically get used the most. I have some web sites for development and I am using Ampache for music and Piwigo for photos.

If Nethserver is not going to support a current version of PHP, I will have to find something that is.

1 Like

thank for your input, php73 is maintained by redhat itself, php8 is a community development of remi collet (redhat software engineer)

If you are ready to hack some files it is possible, in the meanwhile we will have a talk with the dev team.

cc @giacomo

Does remi distribute php8 as SCL package?

yes we use it for the vhost cockpit panel, the concern I have is that it is a manual upgrade path for the rpm. At the time @davidep did not want to enable remi-safe

And he is right.
For sure we can’t enabled remi-safe repository, we need to eventually copy php8 rpms to our repository.

Still, this is a dangerous and hard-to-maintain solution.
We are not going to switch unless this is really necessary. Untile Nextcloud supports PHP 7.3, let’s stick with it.

1 Like

just to imagine what you have to modify, a custom template of the nextcloud vhost panel, this example is related to roundcubemail

1 Like

well not so trivial, we have to patch occ too

OCC might be a bigger concern since it is a major tool for Nextcloud to manage it.