Closed Chamber3399 closed 3 months ago
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.
so are you sure this is a bug in the container then? Cause this seems like a pretty crucial part of the container but it has not been picked up yet
Also having the issue Downloading multiple files with the linuxserver docker image.
See two other tickets open for this issue. One on the official Docker image, another for server.
https://github.com/nextcloud/server/issues/42617 https://github.com/nextcloud/server/issues/42470
I have been running NC28, which I upgraded from NC27. The version I am on is fpm-alpine with Caddy as a proxy. I did nothing with my config whatsoever so this issue occured out of the blue.
It seems donwload.php file is missing some includes. So I borrowed a few lines from other php files and in order to make the download work at least temporarily, you can add these lines at the top of the file (below the comment):
$vendorDir = dirname(__DIR__);
$baseDir = dirname(dirname($vendorDir));
include_once $baseDir . '/lib/base.php';
include_once $baseDir . '/lib/private/legacy/OC_Util.php';
The third line adds OC class and the fourth line is for OC_Utils. This is a dirty hack but does its job for now until someone more into the structure of NC can fix it properly.
This might be a different bug than in #42617 thouch.
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
i just got the issue. going to try one of the comments above.
Closing this as it all seems to have been related to issues upstream. Can confirm that those matches in the php location block are present in the container.
For anyone that finds this issue and can't find a solution, for my setup with SWAG as a reverse proxy, and I would wager others as well, adding these lines from this file to your nextcloud nginx default.conf file fixes the issue. I was following comments and it sounds like it was related to a reverse proxy but it indeed seems to be an issue pertaining to the built in nginx config.
Is there an existing issue for this?
Current Behavior
When you select a folder or multiple files and hit the download button, the download prompts for a htm file which also fails to download due to a "site not available" error.
Looking at the nginx logs, there is the following entry:
`*17311 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class "OC_Util" not found in /config/www/nextcloud/apps/files/ajax/download.php:31 Stack trace:
0 {main}
thrown in /config/www/nextcloud/apps/files/ajax/download.php on line 31" while reading response header from upstream, client: REDACTED, server: _, request: "GET /apps/files/ajax/download.php?REDACTED HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "REDACTED`
Expected Behavior
A zip should be generated and downloaded
Steps To Reproduce
Environment
CPU architecture
x86-64
Docker creation
Container logs