[ciapug] File Upload
Carl Olsen
carl-olsen at mchsi.com
Tue Feb 21 15:49:51 CST 2006
I changed the error_reporting setting in php.ini to ~E_ALL & ~E_STRICT and I
got rid of the error being displayed in the page. The only thing left is
the $_POST array being left empty. I think I'm going to make it a two step
form, so I can get the $_POST array and store it somewhere (session,
querystring, database, etc) before they get to the file upload step. That
should take care of everything.
I thought this was just something that was goofy in ASP, but now I'm
beginning to see it's also goofy in PHP.
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 3:31 PM
To: carl-olsen at mchsi.com; ciapug at cialug.org; barry at vonahsen.com
Subject: RE: [ciapug] File Upload
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
_______________________________________________
ciapug mailing list
ciapug at cialug.org
http://cialug.org/mailman/listinfo/ciapug
More information about the ciapug
mailing list