php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16848 POST vars not in $_REQUEST[]
Submitted: 2002-04-26 07:34 UTC Modified: 2002-05-09 20:45 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: hofmann at isl dot org Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.2.0 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: hofmann at isl dot org
New email:
PHP Version: OS:

 

 [2002-04-26 07:34 UTC] hofmann at isl dot org
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).

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-26 08:42 UTC] yohgaki@php.net
What is the POST/GET related ini setting?
 [2002-04-26 09:31 UTC] hofmann at isl dot org
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 14:04 UTC] sniper@php.net
Can you please add a short and simple script which can be
used to reproduce this?

 [2002-05-01 19:03 UTC] sthomas at townnews dot 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-05-06 02:23 UTC] hofmann at isl dot 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-08 06:25 UTC] hofmann at isl dot 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-08 06:29 UTC] hofmann at isl dot org
As it seems the value is also NOT within $_POST["test"]
 [2002-05-09 20:18 UTC] php at littauer dot com
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
 [2002-05-09 20:45 UTC] rasmus@php.net
Tested in HEAD, 4.2.0 on both Linux and Windows-cgi and unable to reproduce any of this anywhere.

This was indeed a problem in 4.1.1, but is fixed in 4.2.

Probably doesn't work with Apache2, but hopefully you guys would have mentioned if you were using that server.
 [2002-05-13 01:30 UTC] hofmann at hofmann-int dot de
I am using Apache 2.0.36 - seems I missed this point - SORRY!
 [2002-05-13 01:31 UTC] hofmann at hofmann-int dot de
Maybe someone should add an extra field to the bug report form - for the type of web-server!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 11:01:30 2024 UTC