Bug #16848 Updated: POST vars not in $_REQUEST[]

From: Date: Fri, 10 May 2002 00:18:43 +0000
Subject: Bug #16848 Updated: POST vars not in $_REQUEST[]
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-7357@lists.php.net to get a copy of this message
ID: 16848 Updated by: php@littauer.com Reported By: hofmann@isl.org Status: Open Bug Type: Variables related Operating System: Linux PHP Version: 4.2.0 New Comment: Please see also bug # 17088 with similar difficulty running on Windows. Also note that I have this problem on OmniHTTPd on Windows. With similar problems on 2 operating systems and 3 servers it looks to me like either a real PHP problem or a configuration error of some kind. show source Previous Comments: ------------------------------------------------------------------------ [2002-05-08 06:29:54] hofmann@isl.org As it seems the value is also NOT within $_POST["test"] ------------------------------------------------------------------------ [2002-05-08 06:25:47] hofmann@isl.org test1.html: <form method="post" action="test2.php"> <input type="submit" name="test" value="testvalue" /> </form> test2.php: <?php echo $_REQUEST["test"]; ?> calling test2 from test1 results in an empty document, calling test2.php?test=bla results in output 'bla' ------------------------------------------------------------------------ [2002-05-06 02:23:49] hofmann@isl.org I am not using any file upload!! In some scripts I am using array variables but the bug also apears without them! I will try to create a short test script. ------------------------------------------------------------------------ [2002-05-01 19:03:42] sthomas@townnews.com 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 ---------------------- ------------------------------------------------------------------------ [2002-04-26 14:04:59] sniper@php.net Can you please add a short and simple script which can be used to reproduce this? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/16848 -- Edit this bug report at http://bugs.php.net/?id=16848&edit=1

« previous php.bugs (#7357) next »