|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1520 file upload arrays don't work/uploaded files not added to HTTP_POST_VARS
Submitted: 1999-06-09 15:18 UTC Modified: 1999-06-10 08:35 UTC
From: brian at schaffner dot net Assigned: brian (profile)
Status: Closed Package: Parser error
PHP Version: 3.0.7 OS: Redhat Linux 5.2
Private report: No CVE-ID: None
 [1999-06-09 15:18 UTC] brian at schaffner dot net
<form action="<? echo $PHP_SELF; ?>" method="post" enctype="multipart/form-data">
<input type="file" name="thefile[]">
<input type="file" name="thefile[]">
<input type="submit">
while (list($key, $val) = each($HTTP_POST_VARS)) {
    echo "$key: $val<BR>\n";

If you run this, you expect to get:

thefile: Array

There are 2 bugs at work here. The first is that ANY "FILE" doesn't get added to the HTTP_POST_VARS array (although it should be). And, "FILE" arrays don't get defined at all. 

I imagine that this is not too difficult a bug to fix... maybe I'll muck around and see what I can find...



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1999-06-10 08:35 UTC] brian at cvs dot php dot net
Updated mime.c to support file-upload arrays. Also, supports putting the file-upload variables into HTTP_POST_VARS global array. This went into CVS on

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Mar 03 03:01:28 2024 UTC