mriedmann / humhub-docker

Alpine-based PHP-FPM and NGINX HumHub docker-container
MIT License
95 stars 77 forks source link

PHP_POST_MAX_SIZE and/or PHP_UPLOAD_MAX_FILESIZE variable ignored #335

Closed tzw9373 closed 5 months ago

tzw9373 commented 7 months ago

This environment variable appears to be ignored in multiple recent releases, it's overwritten by PHP settings to be 2 MB regardless of value used. Rolling back to 1.11.4 corrected the issue for me.

mriedmann commented 6 months ago

I just tested this with the latest 1.15 version and if I understood your report can't reproduce it.

What I tried:

I used the docker-compose.yml and added the 2 mentioned settings to environments

version: '3.1'
services:
  humhub:
...
    environment:
      PHP_UPLOAD_MAX_FILESIZE: 66m
      PHP_POST_MAX_SIZE: 66m
      NGINX_CLIENT_MAX_BODY_SIZE: 66m
 ...

Then I ran docker compose up, logged in with admin:test and looked at the settings:

image

It shows "PHP reported a maximum of (upload_max_filesize): 66 MB" which suspects that the php setting is loaded successfully. I set the max upload to 66 MB in the humhub admin panel.

After that I uploaded a 60mb testfile and tried to download it again. It worked, but there is a small problem with this local setup: The upload works properly, but the download has some problems if you are not accessing humhub using https and port 443. This is most likely because of some incompatibilities between nginx/fastcgi and humhub messing-up the link generation/hostname-detection.

Besides that, I can't reproduce your problem, sorry.

TL;DR: Have you tried to set all 3 env vars? I also had to increase the file max size in Humhub under Administration > Settings > Advanced > Files > Maximum upload file size (in MB)

mriedmann commented 6 months ago

Ok after setting those correctly it works. So just keep in mind to set them:

In case of a local test-setup it should be this:

HUMHUB_PROTO: 'http'
HUMHUB_HOST: 'localhost:8080'
jvies commented 6 months ago

I think the issue is fixed in master only (cf commit e05758c). @mriedmann did you tried on latest tag or on master ?

mriedmann commented 6 months ago

Oh very good point ... I tested master. Will do a release later. Thx for pointing this out!

jvies commented 6 months ago

Any objection to updating the latest to 1.15.2 instead of 1.15.0 before the new tag ?

mriedmann commented 6 months ago

done (with update to 1.15.2)

github-actions[bot] commented 5 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 5 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.