Recent Changes - Search:

PmWiki

pmwiki.org

UploadVariables-Talk


Cannot get rid of a Forced 2 Meg upload limit

I tried to set a large file limit to be able to upload larger files and pmwiki seems to restrict my upload anyways. Here is a sample of the code

$UploadMaxSize = 0;

$UploadExtSize['zip' ] = 10*1024*1024; // 10 meg

The goal is to allow to upload zip files which are less than 10 megs. But when I try to upload a 3 Megs, it gives me this error:

"file is larger than maximum allowed by webserver"

It seems to do that on all my sites whatever the config I use. There seems to always be a 2 meg limit. I was wondering if the problem was PMwiki or the webserver itself.

Nov 10th, 2012 by Larienna

It is likely a system limit of the webserver, see Cookbook:SystemLimits, about post_max_size and upload_max_filesize. --Petko November 10, 2012, at 10:50 AM


I have

$UploadNameChars = "-\w. !=+#"; # allow exclamations, equals, plus, and hash

but the example now given has \\w. In fact should not the expression then be

$UploadNameChars = "-\\w\. !=\+#"; # allow exclamations, equals, plus, and hash
simon April 17, 2016, at 05:08 AM

No, $UploadNameChars is used inside a character class (in brackets) so the dot and plus characters have no special meaning. The double backslash could also be single in this case for the exact same effect, but in regular expressions I usually escape (double) them. --Petko April 17, 2016, at 06:22 AM

This is a talk page for improving PmWiki.UploadVariables.

Edit - History - Print - Recent Changes - Search
Page last modified on April 17, 2016, at 06:22 AM