linuxserver / docker-dokuwiki

GNU General Public License v3.0
113 stars 24 forks source link

php.ini uses M not MB for filesizes #23

Closed mkrogh closed 4 years ago

mkrogh commented 4 years ago

In root/etc/cont-init.d/50-config it creates a default php-local.ini which specifies filesizes in MB not M which php uses. This means php-fpm thinks it is limited to 100 bytes.

It also causes dokuwiki to show the wrong allowed file size on the media upload page.

From nginx error log:

2020/09/21 20:50:12 [error] 350#350: *152 FastCGI sent in stderr: "PHP message: PHP Warning:  Unknown: POST Content-Length of 1264 bytes exceeds the limit of 100 bytes in Unknown on line 0" while reading response header from upstream, client: 172.17.0.1, server: _, request: "POST /lib/exe/ajax.php HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1:3002", referrer: "[redacted]?do=edit"
github-actions[bot] commented 4 years ago

Thanks for opening your first issue here! Be sure to follow the issue template!

savoiringfaire commented 4 years ago

Just ran into this too as it was blocking the install page from working, effectively making the image unusable by default. For others who run into this, a fix for now is to manually edit /path/to/appdata/config/php/php-local.ini (/path/to/appdata/config being the path on the host mounted to /config in the container) and modify the lines that look like:

upload_max_filesize = 100MB
post_max_size = 100MB

to instead read:

upload_max_filesize = 100M
post_max_size = 100M

and then restart the container. Posting forms (including the install form) should then work.

aptalca commented 4 years ago

This was my bad. I'll fix it shortly