php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15827 posts with enctype=multipart/form-data do not register post vars.
Submitted: 2002-03-02 00:54 UTC Modified: 2002-03-02 06:07 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: scott at datalink dot net dot au Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.1.2 OS: Redhat 7.0
Private report: No CVE-ID: None
 [2002-03-02 00:54 UTC] scott at datalink dot net dot au
Forms with an enctype of 'multitype/form-data' do not register the POST variables.

Here's how to reproduce:

----- Short Script Follows -----
<?
print_r($HTTP_POST_VARS);
?>
<form method=post enctype='multipart/form-data'>
        <input type='text' value='<? print $foo ?>' name='foo'>
        <input type='submit'>
</form>
----- End Script -----

Run the script above.   It is simple enough - it has a form that submits to itself, and then displays the HTTP_POST_VARS variable.

When I remove the enctype='multipart/form-data' attribute from the form tag, the script works fine (i.e. the variable 'foo' appears).   The enctype directive appears to surpress the variables.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-02 01:04 UTC] scott at datalink dot net dot au
My mistake - after my upgrade (due to the security risk) I didn't re-set the ini file to allow file uploads again.   I guess this directive is there to prevent unauthorised multipart submissions.

For others experiencing this problem, check your ini file and ensure the following line exists:

file_uploads = On
 [2002-03-02 06:07 UTC] derick@php.net
Making this bogus (user error)

Derick
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 17:01:29 2024 UTC