[PHP-DEV] Bug #14008 Updated: $_POST/$_FILES when uploaded file is too large

2001-11-18 Thread sniper

ID: 14008
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: HTTP related
Operating System: RHL 7.1
PHP Version: 4.0CVS-2001-11-10
Assigned To: sniper
New Comment:

This is fixed now.

--Jani


Previous Comments:


[2001-11-13 11:20:21] [EMAIL PROTECTED]

As mentioned in irc, it segfaults now when a file is uploaded that's larger than max 
filesize. Recompiling with --enable-debug didn't help, this output in error_log:

Unknown(0) : Warning - upload_max_filesize of 2097152 bytes exceeded - file 
[fileupload] not saved
[Tue Nov 13 17:03:56 2001]  Script:  '/usr/local/apache/vhtdocs/dev/test.php'
---
zend.c(860) : Block 0x403E107D status:
Beginning:  Overrun (magic=0x646E657A, expected=0x7312F8DC)
[Tue Nov 13 17:03:56 2001] [notice] child pid 7 exit signal Segmentation fault 
(11)

Backtrace produced this:

(gdb) run -X
Starting program: /www/bin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
0x40138b9c in memcpy () from /lib/i686/libc.so.6



[2001-11-10 19:48:57] [EMAIL PROTECTED]

Please try the latest CVS and let me know if this is good.
Also note that errors set are stored in $php_errormsg 
variable if you have track_errors=on in your php.ini.

It now also sets different types for the error:

2 /* Uploaded file exceeded upload_max_filesize */
3  /* Uploaded file exceeded MAX_FILE_SIZE */
4  /* Only partiallly uploaded */

Maybe the first 2 might be same?
And we propably should have some PHP land constants for these?




[2001-11-10 10:16:55] [EMAIL PROTECTED]

I'll take care of this.

--Jani




[2001-11-10 09:42:30] [EMAIL PROTECTED]

> so what do you expect?
> 
> the file is to big, so it is rejected

It would be nice to get some sort of confirmation that the file was rejected and why, 
instead of having to guess.

> and the submit button is most likely
> placed after the file input in the form
> so its data comes after the file data in
> the post so its behind the limit, too ...

This is just plain wrong. What about other form data that comes after the file? If I'm 
to redirect the user back to the form because the file was too large, I don't want 
them to have to retype stuff unnecessarily.





[2001-11-10 09:18:51] [EMAIL PROTECTED]

so what do you expect?

the file is to big, so it is rejected

and the submit button is most likely
placed after the file input in the form
so its data comes after the file data in
the post so its behind the limit, too ...




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/?id=14008


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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14008 Updated: $_POST/$_FILES when uploaded file is too large

2001-11-13 Thread heyesr

ID: 14008
Updated by: heyesr
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Open
Bug Type: HTTP related
Operating System: RHL 7.1
PHP Version: 4.0CVS-2001-11-10
Assigned To: sniper
New Comment:

As mentioned in irc, it segfaults now when a file is uploaded that's larger than max 
filesize. Recompiling with --enable-debug didn't help, this output in error_log:

Unknown(0) : Warning - upload_max_filesize of 2097152 bytes exceeded - file 
[fileupload] not saved
[Tue Nov 13 17:03:56 2001]  Script:  '/usr/local/apache/vhtdocs/dev/test.php'
---
zend.c(860) : Block 0x403E107D status:
Beginning:  Overrun (magic=0x646E657A, expected=0x7312F8DC)
[Tue Nov 13 17:03:56 2001] [notice] child pid 7 exit signal Segmentation fault 
(11)

Backtrace produced this:

(gdb) run -X
Starting program: /www/bin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
0x40138b9c in memcpy () from /lib/i686/libc.so.6

Previous Comments:


[2001-11-10 19:48:57] [EMAIL PROTECTED]

Please try the latest CVS and let me know if this is good.
Also note that errors set are stored in $php_errormsg 
variable if you have track_errors=on in your php.ini.

It now also sets different types for the error:

2 /* Uploaded file exceeded upload_max_filesize */
3  /* Uploaded file exceeded MAX_FILE_SIZE */
4  /* Only partiallly uploaded */

Maybe the first 2 might be same?
And we propably should have some PHP land constants for these?




[2001-11-10 10:16:55] [EMAIL PROTECTED]

I'll take care of this.

--Jani




[2001-11-10 09:42:30] [EMAIL PROTECTED]

> so what do you expect?
> 
> the file is to big, so it is rejected

It would be nice to get some sort of confirmation that the file was rejected and why, 
instead of having to guess.

> and the submit button is most likely
> placed after the file input in the form
> so its data comes after the file data in
> the post so its behind the limit, too ...

This is just plain wrong. What about other form data that comes after the file? If I'm 
to redirect the user back to the form because the file was too large, I don't want 
them to have to retype stuff unnecessarily.





[2001-11-10 09:18:51] [EMAIL PROTECTED]

so what do you expect?

the file is to big, so it is rejected

and the submit button is most likely
placed after the file input in the form
so its data comes after the file data in
the post so its behind the limit, too ...




[2001-11-10 09:12:47] [EMAIL PROTECTED]

Version is 4.2.0-dev.

When using the following script:











If an uploaded file is smaller than the limit, then it prints the stuff as expected, 
however if the uploaded file is too large, then the _POST is missing information and 
$_FILES is completely empty.

For example. If the file is ok, this is what I got printed:


Array
(
[hidden] => blah
[submit] => Submit Query
)
Array
(
[fileupload] => Array
(
[name] => expat-1.95.2.tar.gz
[type] => application/x-gzip-compressed
[tmp_name] => /tmp/phpQg7diG
[size] => 190316
)

)

And if the file is larger than 2Mb, this is what's printed:


Array
(
[hidden] => blah
)
Array
(
)






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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14008 Updated: $_POST/$_FILES when uploaded file is too large

2001-11-10 Thread sniper

ID: 14008
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Assigned
Status: Feedback
Bug Type: HTTP related
Operating System: RHL 7.1
PHP Version: 4.0CVS-2001-11-10
Assigned To: sniper
New Comment:

Please try the latest CVS and let me know if this is good.
Also note that errors set are stored in $php_errormsg 
variable if you have track_errors=on in your php.ini.

It now also sets different types for the error:

2 /* Uploaded file exceeded upload_max_filesize */
3  /* Uploaded file exceeded MAX_FILE_SIZE */
4  /* Only partiallly uploaded */

Maybe the first 2 might be same?
And we propably should have some PHP land constants for these?


Previous Comments:


[2001-11-10 10:16:55] [EMAIL PROTECTED]

I'll take care of this.

--Jani




[2001-11-10 09:42:30] [EMAIL PROTECTED]

> so what do you expect?
> 
> the file is to big, so it is rejected

It would be nice to get some sort of confirmation that the file was rejected and why, 
instead of having to guess.

> and the submit button is most likely
> placed after the file input in the form
> so its data comes after the file data in
> the post so its behind the limit, too ...

This is just plain wrong. What about other form data that comes after the file? If I'm 
to redirect the user back to the form because the file was too large, I don't want 
them to have to retype stuff unnecessarily.





[2001-11-10 09:18:51] [EMAIL PROTECTED]

so what do you expect?

the file is to big, so it is rejected

and the submit button is most likely
placed after the file input in the form
so its data comes after the file data in
the post so its behind the limit, too ...




[2001-11-10 09:12:47] [EMAIL PROTECTED]

Version is 4.2.0-dev.

When using the following script:











If an uploaded file is smaller than the limit, then it prints the stuff as expected, 
however if the uploaded file is too large, then the _POST is missing information and 
$_FILES is completely empty.

For example. If the file is ok, this is what I got printed:


Array
(
[hidden] => blah
[submit] => Submit Query
)
Array
(
[fileupload] => Array
(
[name] => expat-1.95.2.tar.gz
[type] => application/x-gzip-compressed
[tmp_name] => /tmp/phpQg7diG
[size] => 190316
)

)

And if the file is larger than 2Mb, this is what's printed:


Array
(
[hidden] => blah
)
Array
(
)






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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14008 Updated: $_POST/$_FILES when uploaded file is too large

2001-11-10 Thread sniper

ID: 14008
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Assigned
Old Bug Type: Unknown/Other Function
Bug Type: HTTP related
Operating System: RHL 7.1
PHP Version: 4.0CVS-2001-11-10
Old Assigned To: hholzgra
Assigned To: sniper
New Comment:

I'll take care of this.

--Jani


Previous Comments:


[2001-11-10 09:42:30] [EMAIL PROTECTED]

> so what do you expect?
> 
> the file is to big, so it is rejected

It would be nice to get some sort of confirmation that the file was rejected and why, 
instead of having to guess.

> and the submit button is most likely
> placed after the file input in the form
> so its data comes after the file data in
> the post so its behind the limit, too ...

This is just plain wrong. What about other form data that comes after the file? If I'm 
to redirect the user back to the form because the file was too large, I don't want 
them to have to retype stuff unnecessarily.





[2001-11-10 09:18:51] [EMAIL PROTECTED]

so what do you expect?

the file is to big, so it is rejected

and the submit button is most likely
placed after the file input in the form
so its data comes after the file data in
the post so its behind the limit, too ...




[2001-11-10 09:12:47] [EMAIL PROTECTED]

Version is 4.2.0-dev.

When using the following script:











If an uploaded file is smaller than the limit, then it prints the stuff as expected, 
however if the uploaded file is too large, then the _POST is missing information and 
$_FILES is completely empty.

For example. If the file is ok, this is what I got printed:


Array
(
[hidden] => blah
[submit] => Submit Query
)
Array
(
[fileupload] => Array
(
[name] => expat-1.95.2.tar.gz
[type] => application/x-gzip-compressed
[tmp_name] => /tmp/phpQg7diG
[size] => 190316
)

)

And if the file is larger than 2Mb, this is what's printed:


Array
(
[hidden] => blah
)
Array
(
)






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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14008 Updated: $_POST/$_FILES when uploaded file is too large

2001-11-10 Thread heyesr

ID: 14008
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Open
Bug Type: Unknown/Other Function
Operating System: RHL 7.1
PHP Version: 4.0CVS-2001-11-10
Old Assigned To: hholzgra
Assigned To: 
New Comment:

> so what do you expect?
> 
> the file is to big, so it is rejected

It would be nice to get some sort of confirmation that the file was rejected and why, 
instead of having to guess.

> and the submit button is most likely
> placed after the file input in the form
> so its data comes after the file data in
> the post so its behind the limit, too ...

This is just plain wrong. What about other form data that comes after the file? If I'm 
to redirect the user back to the form because the file was too large, I don't want 
them to have to retype stuff unnecessarily.



Previous Comments:


[2001-11-10 09:18:51] [EMAIL PROTECTED]

so what do you expect?

the file is to big, so it is rejected

and the submit button is most likely
placed after the file input in the form
so its data comes after the file data in
the post so its behind the limit, too ...




[2001-11-10 09:12:47] [EMAIL PROTECTED]

Version is 4.2.0-dev.

When using the following script:











If an uploaded file is smaller than the limit, then it prints the stuff as expected, 
however if the uploaded file is too large, then the _POST is missing information and 
$_FILES is completely empty.

For example. If the file is ok, this is what I got printed:


Array
(
[hidden] => blah
[submit] => Submit Query
)
Array
(
[fileupload] => Array
(
[name] => expat-1.95.2.tar.gz
[type] => application/x-gzip-compressed
[tmp_name] => /tmp/phpQg7diG
[size] => 190316
)

)

And if the file is larger than 2Mb, this is what's printed:


Array
(
[hidden] => blah
)
Array
(
)






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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14008 Updated: $_POST/$_FILES when uploaded file is too large

2001-11-10 Thread hholzgra

ID: 14008
Updated by: hholzgra
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: Unknown/Other Function
Operating System: RHL 7.1
PHP Version: 4.0CVS-2001-11-10
Old Assigned To: 
Assigned To: hholzgra
New Comment:

so what do you expect?

the file is to big, so it is rejected

and the submit button is most likely
placed after the file input in the form
so its data comes after the file data in
the post so its behind the limit, too ...


Previous Comments:


[2001-11-10 09:12:47] [EMAIL PROTECTED]

Version is 4.2.0-dev.

When using the following script:











If an uploaded file is smaller than the limit, then it prints the stuff as expected, 
however if the uploaded file is too large, then the _POST is missing information and 
$_FILES is completely empty.

For example. If the file is ok, this is what I got printed:


Array
(
[hidden] => blah
[submit] => Submit Query
)
Array
(
[fileupload] => Array
(
[name] => expat-1.95.2.tar.gz
[type] => application/x-gzip-compressed
[tmp_name] => /tmp/phpQg7diG
[size] => 190316
)

)

And if the file is larger than 2Mb, this is what's printed:


Array
(
[hidden] => blah
)
Array
(
)






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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]