Problem with the mass multiple files upload
| From: | Chippyho | Date: | Wed, 07 Nov 2001 07:43:36 +0000 |
| Subject: | Problem with the mass multiple files upload | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-73679@lists.php.net to get a copy of this message | ||
Hi All ,
I got into trouble when try to use multiple files upload in PHP4. I use '[]'
after field name as usual like this.
<form action="upload.php" method="post"
enctype="multipart/form-data">
1.<input name="userfile[]" type="file"><br>
2.<input name="userfile[]" type="file"><br>
3.<input name="userfile[]" type="file"><br>
.....
40.<input name="userfile[]" type="file"><br>
<input type="submit" name="submit" value="Upload">
</form>
And in "upload.php" is while loops to get the filename in an array and then
copy to specify path.
So, if I use the input box just 38 boxs and preee submit this seem to be no
problem.
But if I add more input box (at least just 1 box) to 39 boxs or 40 box or
more. The error 500 internal server error is display from apache server (I
tested on Windows ME and Linux -- Just display >38 boxs the error will occur
when press the submit button (it can display but can't submit) , although I
add just 1 file or nothing to upload)
and in error log file is display like this :
"Premature end of script headers:"
I have no idea what to do so. Any answers are alway welcome.
Thanks in your advance ,
-Chippy Ho-