[pmwiki-users] file is larger than maximum allowed by webserver

Patrick R. Michaud pmichaud at pobox.com
Fri May 13 11:58:37 CDT 2005


On Fri, May 13, 2005 at 06:32:57PM +0200, Joachim Durchholz wrote:
> Richard Geoffrion wrote:
> >Those are the only two/tree locations I can see that affect uploading.
> >Are there more?
> 
> Yes. The error message is referring to the web server side of things, 
> i.e. Xitami/IIS/Apache/whatever.

Exactly -- any of PmWiki, PHP, or the webserver can be limiting the
size of uploads.  Worse, PHP and the webserver don't always give PmWiki
enough information to know which is setting the limit.

> Assuming you're using Apache, take a look at the LimitRequestBody 
> directive (http://httpd.apache.org/docs/mod/core.html#limitrequestbody). 
> You'd probably want to raise the maximum size only for the PUT method, 
> and only in the uploads directory, so you'd probably want to write 
> something like
>   <Directory /path/for/uploads>
>     <Limit PUT>
>       LimitRequestBody 16000000
>     </Limit>
>   </Directory>
> either in .htaccess (in that case, you can omit the <Directory> wrapper) 
> or in httpd.conf.

PmWiki doesn't use HTTP PUT for uploads, it uses HTTP POST (i.e., form-based
file uploads), and the POST goes to pmwiki.php, not to the uploads directory.
(Otherwise PmWiki cannot do any verification/checking on the file
before it goes into the uploads directory.)

Easiest is generally something like:

    <Directory /path/to/pmwiki_dir>
    LimitRequestBody 16000000
    </Directory>

Pm



More information about the pmwiki-users mailing list