[PHP-DOC] #31775 [Csd]: Undefined behavior when uploaded file post_max_size

2005-04-12 Thread rudolf at softwares dot ch
 ID:   31775
 User updated by:  rudolf at softwares dot ch
 Reported By:  rudolf at softwares dot ch
 Status:   Closed
 Bug Type: Documentation problem
 Operating System: Windows XP Pro
 PHP Version:  4.3.9
 New Comment:

You're right; it doesn't belong in $_FILES. But having to check the
states of three arrays is also not the ideal way to check for the
error.


Previous Comments:


[2005-04-01 10:33:00] [EMAIL PROTECTED]

post_max_size is not necessarily bound to $_FILES. You can exceed it by
sending e.g. big textarea. Thus $_FILES['userfile']['error'] is not
the right place to report this error.



[2005-04-01 10:24:13] rudolf at softwares dot ch

Upon further testing, only Safari reacts to an uploaded file whose size
is greater than post_max_size by saying it cannot connect to the server.
Other browsers do indeed receive what is written to stdout.

Would it not be a more consistent solution if a new error code was
defined for $_FILES['userfile']['error'] for this situation, instead of
having to check for certain (not necessarily intuitive) states in the
$_POST and $_FILES and $_GET arrays?



[2005-03-31 12:00:24] [EMAIL PROTECTED]

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.

If the size of post data is greater than post_max_size, $_POST and
$_FILES arrays are empty. You can track this condition various ways,
e.g. by passing $_GET variable to the script processing the data, i.e.
form action=edit.php?processed=1 and cheching this variable.



[2005-03-31 11:44:02] [EMAIL PROTECTED]

Are you sure nothing is written to stdout? On the same environment, I
experienced $_POST and $_FILES empty in case of data-size greater than
post_max_size, but everything is written to stdout as usual.

Can you please give us a link to source of fileupload.php?



[2005-03-29 10:32:58] markusg at cants dot no dot spam dot de

PHP also completely truncates the POST request, so you can't even tell
there was one. Perhaps it would be more useful to process the incoming
data up to the point where the post_max_size limit is reached, and then
set a flag the programmer can check for.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/31775

-- 
Edit this bug report at http://bugs.php.net/?id=31775edit=1


[PHP-DOC] #31775 [Csd]: Undefined behavior when uploaded file post_max_size

2005-04-01 Thread rudolf at softwares dot ch
 ID:   31775
 User updated by:  rudolf at softwares dot ch
 Reported By:  rudolf at softwares dot ch
 Status:   Closed
 Bug Type: Documentation problem
 Operating System: Windows XP Pro
 PHP Version:  4.3.9
 New Comment:

Upon further testing, only Safari reacts to an uploaded file whose size
is greater than post_max_size by saying it cannot connect to the server.
Other browsers do indeed receive what is written to stdout.

Would it not be a more consistent solution if a new error code was
defined for $_FILES['userfile']['error'] for this situation, instead of
having to check for certain (not necessarily intuitive) states in the
$_POST and $_FILES and $_GET arrays?


Previous Comments:


[2005-03-31 12:00:24] [EMAIL PROTECTED]

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.

If the size of post data is greater than post_max_size, $_POST and
$_FILES arrays are empty. You can track this condition various ways,
e.g. by passing $_GET variable to the script processing the data, i.e.
form action=edit.php?processed=1 and cheching this variable.



[2005-03-31 11:44:02] [EMAIL PROTECTED]

Are you sure nothing is written to stdout? On the same environment, I
experienced $_POST and $_FILES empty in case of data-size greater than
post_max_size, but everything is written to stdout as usual.

Can you please give us a link to source of fileupload.php?



[2005-03-29 10:32:58] markusg at cants dot no dot spam dot de

PHP also completely truncates the POST request, so you can't even tell
there was one. Perhaps it would be more useful to process the incoming
data up to the point where the post_max_size limit is reached, and then
set a flag the programmer can check for.



[2005-01-31 11:40:53] rudolf at softwares dot ch

OK, but the documentation does not explain how this fairly common
condition (an uploaded file  post_max_size) can be trapped.



[2005-01-31 11:27:55] [EMAIL PROTECTED]

The behavior is correct as POST data is received before the request is
run, but upload_max_filesize is checked later.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/31775

-- 
Edit this bug report at http://bugs.php.net/?id=31775edit=1


[PHP-DOC] #31775 [Csd]: Undefined behavior when uploaded file post_max_size

2005-04-01 Thread vrana
 ID:   31775
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rudolf at softwares dot ch
 Status:   Closed
 Bug Type: Documentation problem
 Operating System: Windows XP Pro
 PHP Version:  4.3.9
 New Comment:

post_max_size is not necessarily bound to $_FILES. You can exceed it by
sending e.g. big textarea. Thus $_FILES['userfile']['error'] is not
the right place to report this error.


Previous Comments:


[2005-04-01 10:24:13] rudolf at softwares dot ch

Upon further testing, only Safari reacts to an uploaded file whose size
is greater than post_max_size by saying it cannot connect to the server.
Other browsers do indeed receive what is written to stdout.

Would it not be a more consistent solution if a new error code was
defined for $_FILES['userfile']['error'] for this situation, instead of
having to check for certain (not necessarily intuitive) states in the
$_POST and $_FILES and $_GET arrays?



[2005-03-31 12:00:24] [EMAIL PROTECTED]

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.

If the size of post data is greater than post_max_size, $_POST and
$_FILES arrays are empty. You can track this condition various ways,
e.g. by passing $_GET variable to the script processing the data, i.e.
form action=edit.php?processed=1 and cheching this variable.



[2005-03-31 11:44:02] [EMAIL PROTECTED]

Are you sure nothing is written to stdout? On the same environment, I
experienced $_POST and $_FILES empty in case of data-size greater than
post_max_size, but everything is written to stdout as usual.

Can you please give us a link to source of fileupload.php?



[2005-03-29 10:32:58] markusg at cants dot no dot spam dot de

PHP also completely truncates the POST request, so you can't even tell
there was one. Perhaps it would be more useful to process the incoming
data up to the point where the post_max_size limit is reached, and then
set a flag the programmer can check for.



[2005-01-31 11:40:53] rudolf at softwares dot ch

OK, but the documentation does not explain how this fairly common
condition (an uploaded file  post_max_size) can be trapped.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/31775

-- 
Edit this bug report at http://bugs.php.net/?id=31775edit=1