Upload issue ABC-Wiki

Uploaden van relatief kleine bestanden lukt soms niet bij ABC-Wiki1), ondanks dat de maximale limiet op 2MB stond.

root@perfubuserv:# tail /var/www/abc-wiki.nl/log/error.log
[Fri May 15 17:18:31.256565 2015] [fcgid:warn] [pid 45375] [client 10.20.30.77:53858] mod_fcgid: HTTP request length 132502 (so far) exceeds MaxRequestLen (131072), referer: http://abc-wiki.nl/bron/start?do=media&ns=
[Fri May 15 17:18:56.571442 2015] [access_compat:error] [pid 6168] [client 10.20.30.77:53863] AH01797: client denied by server configuration: /var/www/abc-wiki.nl/web/bron/data/security.png, referer: http://abc-wiki.nl/bron/start?do=admin
[Fri May 15 17:19:56.323151 2015] [fcgid:warn] [pid 45374] [client 10.20.30.77:53880] mod_fcgid: HTTP request length 132502 (so far) exceeds MaxRequestLen (131072), referer: http://abc-wiki.nl/bron/start?do=media&ns=
[Fri May 15 17:24:48.475447 2015] [access_compat:error] [pid 2277] [client 10.20.30.77:53898] AH01797: client denied by server configuration: /var/www/abc-wiki.nl/web/bron/data/security.png, referer: http://abc-wiki.nl/bron/start?do=admin
[Fri May 15 17:25:15.239468 2015] [fcgid:warn] [pid 2277] [client 10.20.30.77:53907] mod_fcgid: HTTP request length 132502 (so far) exceeds MaxRequestLen (131072), referer: http://abc-wiki.nl/bron/start?do=media&ns=
[Fri May 15 18:48:14.496677 2015] [fcgid:warn] [pid 2441] [client 10.20.30.77:54323] mod_fcgid: HTTP request length 132502 (so far) exceeds MaxRequestLen (131072), referer: http://abc-wiki.nl/bron/start?tab_files=upload&do=media&ns=tmp
[Fri May 15 18:51:55.900008 2015] [fcgid:warn] [pid 2277] [client 10.20.30.77:54392] mod_fcgid: HTTP request length 132502 (so far) exceeds MaxRequestLen (131072), referer: http://abc-wiki.nl/bron/tmp/test?tab_files=upload&do=media&tab_details=view&ns=tmp
[Fri May 15 19:42:14.440723 2015] [fcgid:warn] [pid 4183] [client 10.20.30.77:54794] mod_fcgid: HTTP request length 132502 (so far) exceeds MaxRequestLen (131072), referer: http://abc-wiki.nl/bron/tmp/test?tab_files=upload&do=media&tab_details=view&ns=tmp
[Fri May 15 19:46:06.183054 2015] [fcgid:warn] [pid 4183] [client 10.20.30.77:54930] mod_fcgid: HTTP request length 132502 (so far) exceeds MaxRequestLen (131072), referer: http://abc-wiki.nl/bron/tmp/test?tab_files=upload&do=media&tab_details=view&ns=tmp
[Fri May 15 19:46:51.309508 2015] [fcgid:warn] [pid 2277] [client 10.20.30.77:54939] mod_fcgid: HTTP request length 132502 (so far) exceeds MaxRequestLen (131072), referer: http://abc-wiki.nl/bron/tmp/test?tab_files=upload&do=media&tab_details=view&ns=tmp
 
root@perfubuserv:#

Probleem werd veroorzaakt door een te lage default waarde voor MaxRequestLen voor FastCGI. Deze staat standaard op slechts 128KB. Deze waarde werd echter niet getoond op het uploadformulier.

De maximale upload limieten voor zowel FastCGI als PHP zijn nu ingesteld op 8MB.

2 wijzigingen

root@perfubuserv:/var/www# date
Fri May 15 22:22:04 CEST 2015
 
## 1 ##
root@perfubuserv:# cat /etc/php5/cgi/php.ini
...
#upload_max_filesize = 2M - JohnG
upload_max_filesize = 8M
...
 
 
## 2 ##
# File: /etc/apache2/sites-available/abc-wiki.nl.vhost
 
<VirtualHost *:80>
...
  <IfModule mod_fcgid.c>
  ...
    MaxRequestLen 8388608
    FcgidMaxRequestLen 8388608
  </IfModule>
...
 
<VirtualHost *:443>
...
  <IfModule mod_fcgid.c>
  ...
    MaxRequestLen 8388608
    FcgidMaxRequestLen 8388608
  </IfModule>
...

Apache restart

root@perfubuserv:# /etc/init.d/apache2 restart
 * Restarting web server apache2
AH00548: NameVirtualHost has no effect and will be removed in 
  the next release /etc/apache2/sites-enabled/000-ispconfig.conf:62
AH00557: apache2: apr_sockaddr_info_get() failed for perfubuserv.nl
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, 
  using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
     [ OK ]
root@perfubuserv:#

Zie ook http://stuffthatspins.com/2013/01/22/exceeds-maxrequestlen-16777216-plesk-mod_fcgid-unable-to-upload-large-files/


1)
ABC-Wiki is de geanonimiseerde naam van een bestaande wiki waaraan ik heb gewerkt.
  • content/2015051522300918.txt
  • Last modified: 2020/08/22 20:34