ID: 16848 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Feedback Bug Type: Variables related Operating System: Linux PHP Version: 4.2.0 New Comment:
This error only occurs on multipart/form-data forms that submit array containers and contain at least one file-upload field, and occurs whether a file is uploaded or not. It appears as if PHP ignores the array name, and uses it as a straight variable name, overwriting everything that used that array name. Note that $_POST is not affected by this bug. Only $_REQUEST. The field marked as a file upload will not appear in $_POST, but I'm not sure that's a bug. Here is a sample script: ---------------------- CUT HERE ---------------------- <form action="<?PHP print $_SERVER['REQUEST_URI']; ?>" method="post" enctype="multipart/form-data"> <input type="text" name="TEST[stuff]"><BR> <input type="text" name="TEST[moo]"><BR> <input type="file" name="TEST[uploadme]"><BR> <input type="submit" value="Test"> </form> <?PHP var_dump($_REQUEST); var_dump($_POST); ?> ---------------------- CUT HERE ---------------------- Previous Comments: ------------------------------------------------------------------------ [2002-04-26 14:04:59] [EMAIL PROTECTED] Can you please add a short and simple script which can be used to reproduce this? ------------------------------------------------------------------------ [2002-04-26 09:31:05] [EMAIL PROTECTED] safe_mode = Off Setting: variables_order = "EGPCS" register_globals = On post_max_size = 8M gpc_order = "GPC" magic_quotes_gpc = On p.s.: I am on vacation and will be back at 6 march for further questions ------------------------------------------------------------------------ [2002-04-26 08:42:07] [EMAIL PROTECTED] What is the POST/GET related ini setting? ------------------------------------------------------------------------ [2002-04-26 07:34:56] [EMAIL PROTECTED] With PHP 4.1.2 the post vars from a form are found in $_REQUEST[], but with 4.2.0 only get vars seem to be there. (same php.ini file for both versions used). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16848&edit=1