[ciapug] File Upload

Carl Olsen carl-olsen at mchsi.com
Tue Feb 21 15:31:18 CST 2006


Here is the error message I get when I try to upload the executable for Zend
Studio Professinal:

PHP Warning: POST Content-Length of 62195946 bytes exceeds the limit of
10485760 bytes in Unknown on line 0

I can trap the situation where the form has been submitted and the $_FILES
and $_POST arrays are empty, but I can't seem to hide this machine-generated
error code at the bottom of the page.

I'm using the function ini_set("error_reporting", "~E_ALL") at the top of
the page, but it's not suppressing the error from being written at the
bottom of the page.

Carl

-----Original Message-----
From: ciapug-bounces at cialug.org [mailto:ciapug-bounces at cialug.org] On Behalf
Of Carl Olsen
Sent: Tuesday, February 21, 2006 2:41 PM
To: barry at vonahsen.com; ciapug at cialug.org
Subject: RE: [ciapug] File Upload

Here's one of the user comments from the PHP online manual regarding file
uploads

jason
09-Jan-2006 05:08 
Regarding empty $_FILES and $_POST arrays when uploading files larger than
post_max_size:

Tucked away in http://us3.php.net/manual/en/ini.core.php#ini.post-max-size
is this nugget:

"If the size of post data is greater than post_max_size, the $_POST and
$_FILES superglobals are empty. This can be tracked in various ways, e.g. by
passing the $_GET variable to the script processing the data, i.e. <form
action="edit.php?processed=1">, and then checking if $_GET['processed'] is
set."

This may seem like a bug. You'd expect something like UPLOAD_ERR_FORM_SIZE
to be set. But you just two empty superglobals.

I've seen it submitted to bugs.php.net twice and it's been marked as bogus
both times.

Carl




More information about the ciapug mailing list