php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15902 File Upload bug when sending many of files in upload multipart/form-data ?
Submitted: 2002-03-06 11:09 UTC Modified: 2002-03-06 16:41 UTC
From: m at brturbo dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.1.2 OS: Linux Slackware 7.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: m at brturbo dot com
New email:
PHP Version: OS:

 

 [2002-03-06 11:09 UTC] m at brturbo dot com
Sorry to annoy but i sent yesterday an email to Stefan Esser, and he told me to open a bug report about the possibility of a bug in file upload.

I updated my php to 4.1.2 and i?m having such a strange problem with file upload i was woundering about a bug, because i tried to look at rfc 2616 http1.1 and 1827, file
upload rfc and i didn?t find anything about it.

I wrote a code, that i can upload in one form unlimited files, at the beggining i?m using

ini_set("upload_max_filesize","10M");
set_time_limit(0);

since then its all ok

it works all normally when i upload less than +- 20 or 25 files but when i try 35
for example, the variables from post, that goes before the 35 <input type=file> tags doesn?t come...

i put a debug at the begging

foreach ($HTTP_POST_VARS as $k => $v) { echo "$k => $v<br>"; }
foreach ($HTTP_POST_FILES as $k => $v) { echo "$k ==> $v<br>"; }

when i get 10 or 15 files it returns to me

field1 => value
field2=> value
field3=> value
file1 ==> array
file2 ==> array
file3 ==> array
file4 ==> array
file5 ==> array
...... ==> array
field4 => value
field5 => value

but when i try 30 for example

it returns only

field1 => value
field2=> value
field3=> value
file1 ==> array

very strange isn?t it ?

I don?t know if there is any limitation in post data, but i thought that if this exists it should return some warning or something, but it seemed to me be very strange.

Sorry to annoy, or sorry if its not a bug, or limitation but im getting mad with this :o/ thanx for the oportunity and sorry for poor english

Marcus Vin?cius

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-06 11:11 UTC] derick@php.net
Hello,

the file upload code was rewritten for PHP 4.2.0, can you try a snapshot from snaps.php.net and see if it works?

regards,
Derick
 [2002-03-06 11:44 UTC] m at brturbo dot com
I?ll post the code that i?m using

the point is using 20 different files of about 20 k each

use file.php?num=numberoffiles

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>

<BODY>

<?

foreach ($HTTP_POST_VARS as $k => $v) { echo "$k => $v<br>"; }
foreach ($HTTP_POST_FILES as $k => $v) { echo "$k ==> $v<br>"; }

?>

<form method=post enctype="multipart/form-data">
<input type=text name=field1><br>
<input type=text name=field2><br>
<input type=text name=field3><br>
<? 
for ($i=1;$num>=$i;$i++) {
 echo "<input type=file name=file".$i."><br>";
}
?>
<input type=text name=field4><br>
<input type=text name=field5><bR>
<input type=submit>
</form>
</BODY>
</HTML>
 [2002-03-06 13:01 UTC] derick@php.net
I'll ask again, can you please try a snapshot from snaps.php.net?

Derick
 [2002-03-06 14:16 UTC] m at brturbo dot com
Hi i instaled the php4-latest.tar.gz from snaps.php.net and now it worked perfectly. with 20 and 40 files

but sorry for lack of knowlege, but i was woundering about the possibility of new serious bugs at dev version, should i stay with this version ? should i wait for 4.2 ? 

sorry to annoy but is there a way to update only the file upload part in php 4.1.2 manually copying some files from the dev source ?

thank you for helping and helping me now on

Thanks a lot derick and ppl from php.net

Marcus Vin?cius
 [2002-03-06 16:41 UTC] sniper@php.net
This works just fine with the latest CVS.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 07:01:34 2024 UTC