Re: problems with uploads to wordpress

Martin D Kealey <[email protected]> Tue, 6 Dec 2011 12:48:51 +1300 (NZDT)
Newsgroups gmane.org.user-groups.linux.new-zealand.general
Message-ID <alpine.DEB.2.00.1112061227550.15499@feathers>
> On Sat, 3 Dec 2011 11:28:13 +1300, David Pando wrote:
> > Increasing upload_max_filesize is not usually enough, as you also have to
> > increase post_max_size .

On Sat, 3 Dec 2011, Robin Paulson wrote:
> that's at 8MB already, should it be bigger than upload_max_filesize by some
> factor?

It all depends on how the data is encoded.

If both the server and the client (browser) do unencoded binary POST then
the same number will work for both.

To allow for base-64 encoding, a margin of around 1.4 would cover the 1.333
factor of the actual encoding, a 1.03 factor for extra whitespace, and a
teeny bit more for HTTP headers.

To allow for URI "percent" encoding, allow a factor of about 2.3: the 94
printable ASCII characters (excluding "%") are represented by themselves; all
other octets are represented by 3 octets, so the expansion ratio for linear
random data averages at 2.2656, but the actual expansion ratio will depend
on the data in any given case. (Using GET will use always percent-encoding.)

Of course, you may allow compression as well, in which case (if the client
and server agree) the ratio may be 0.33 or less.

-Martin

_______________________________________________
NZLUG mailing list [email protected]
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug