Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#77122 - [nextcloud] occ wrapper: wrong php config?

Attached to Project: Community Packages
Opened by Lex Black (TrialnError) - Saturday, 14 January 2023, 13:34 GMT
Last edited by David Runge (dvzrv) - Saturday, 14 January 2023, 23:51 GMT
Task Type General Gripe
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
David Runge (dvzrv)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
I updated the nextcloud and php packages today. I will note, that I switched to the php-legacy packages so nextcloud itself is running on php 8.1. php 8.2 is uninstalled and the config files are .pacsave.
But the hook and issuing occ resulted in an error (no db connection possible)

I looked into /usr/bin/occ and found those lines at the top of the file:
______
#!/usr/bin/env bash

readonly default_config="/etc/php/php.ini"
readonly default_php_command="/usr/bin/php-legacy"
______

default_php_command looks good, but the path to the config not. And changing this to php-legacy/php.ini fixed the issue.
In and itself I can control the script with the respective environment vars, but shouldn't it work out of the box if there isn't any modification in regards to config locations done?

Additional info:
* nextcloud 25.0.2-2

Steps to reproduce:
Unset any nextcloud related env vars and see if occ is still working.
This task depends upon

Closed by  David Runge (dvzrv)
Saturday, 14 January 2023, 23:51 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with nextcloud 25.0.2-4
Comment by zoltix (zoltix) - Saturday, 14 January 2023, 14:23 GMT
after the update i also found that i was missing the uwsgi-plugin-php-legacy package. which can be correct because you can choose between uwsgi and php-fpm.
After installing the uwsgi-plugin-php-legacy package, it created a file /usr/lib/uwsgi/php_legacy_plugin.so
I found an inconsistency in the file that came from the package /etc/uwsgi/nextcloud.ini.pacnew the parameter plugins = php-legacy with minus and not with underscacore(_, /usr/lib/uwsgi/php_legacy_plugin.so).
I managed to get occ working but but my website, it tells me that "This version of Nextcloud is not compatible with PHP>=8.2."


Comment by David Runge (dvzrv) - Saturday, 14 January 2023, 16:03 GMT
We can certainly look into adjusting the script so that the config dir is also automatically set to the correct location.
Comment by David Runge (dvzrv) - Saturday, 14 January 2023, 16:14 GMT
This should be fixed with 25.0.2-3. Please test.
Comment by zoltix (zoltix) - Saturday, 14 January 2023, 16:21 GMT
I thought that changing the plugin = php_legacy parameter in /etc/uwsgi/nextcloud.ini would be enough to make nexcloud work/force with an old version of PHP.
but no it didn't work.
https://cloud-dev.lli.be/


Comment by David Runge (dvzrv) - Saturday, 14 January 2023, 16:26 GMT
@zoltix: Please open your own ticket for your problem and stop using this one, which has a different scope.
Comment by David Runge (dvzrv) - Saturday, 14 January 2023, 17:06 GMT
@zoltix: FWIW, I believe 25.0.2-4 fixes the issue with the uwsgi configuration file.
Comment by Lex Black (TrialnError) - Saturday, 14 January 2023, 19:26 GMT
Tested with 25.0.2-4 and occ worked out of the box. :)
So from my side this can be closed.

Loading...