00716: please reveal the maximum upload file size

Summary: please reveal the maximum upload file size
Created: 2006-04-03 17:12
Status: Closed
Category: Feature
From: Steve
Assigned:
Priority: 2
Version:
OS:

Description: I tried to upload an 8MB file. After a long time, I found out this it too big. It would be nice if it revealed the actual maximum size at this point, rather than leaving me in a guessing game.


Comments:

Having the wiki actually stop you before you upload the file is a problem. See below:

From pmwiki-users:
> I have a wiki where I have allowed a few people to upload large files.
> However, the occasional user doesn't realize that the particular file
> type isn't allowed by my wiki configuration.  Unfortunately, the way
> the uploads work, they have to wait until the file has been uploaded
> to be told that their file type is disallowed.  Is there any way to
> tweak that so that they are cut off before they have to wait while the
> file is uploaded?

pm's reply:

Not really; this is a limitation of PHP. PHP doesn't pass control to PmWiki until it has received the entire request (including the file upload), so the earliest point at which PmWiki gets a chance to do anything is after the file has been uploaded.

As such, the best thing to do may be to change Site/UploadQuickReference so that it clearly states the maximum upload size.


Some maximum file size limitations are external to PmWiki -- they're controlled by either PHP or Apache. When PmWiki is the limiting factor, it indicates to the author what the maximum allowed size is, but if PHP or Apache are the limiting factors, PmWiki has no way of knowing what the limit is (and thus cannot inform the author).

Pm


Is there any way of telling which PHP/Apache limitations are responsible for the file size limit? For our intranet, I had to limit the upload size to 2 MB in order to ensure that a proper error message is displayed. (Above 2 MB, there is no proper error message, and thanks to your explanation, I now understand the reason for that.)

I have set the Apache to allow much larger files than 2 MB, but that doesn't seem to change anything. Just last week, I realized that the PHP max_execution_time is a limit for downloads (unless direct downloads are disabled). From your explanation, I'd say it probably doesn't affect maximum upload size though?

Any hints on optimizing performance for PmWiki would be appreciated :-) --Henning May 23, 2006, at 10:33 AM

The PHP parameter to look for is upload_max_filesize. --Henning October 31, 2006, at 09:58 AM