php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39789 $_POST data not accessible
Submitted: 2006-12-10 18:52 UTC Modified: 2007-01-28 01:00 UTC
Votes:14
Avg. Score:4.6 ± 0.7
Reproduced:13 of 13 (100.0%)
Same Version:8 (61.5%)
Same OS:8 (61.5%)
From: mpaige at ryanidirect dot com Assigned:
Status: No Feedback Package: Unknown/Other Function
PHP Version: 5.2.0 OS: Windows 2003 /XP sp2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-12-10 18:52 UTC] mpaige at ryanidirect dot com
Description:
------------
$_POST variable unavailable while $_GET is.  

Reproduce code:
---------------
// FAIL: This returns -1
if(isset($_POST['senderName'])){
	$msg = 1;	
} else {
	$msg = -1;
}

echo $msg;

<form action="sendCard.php" method="POST">
<input name="senderName" value="" type="text" size="60" maxlength="60" /><br />
<input name="send" type="submit" /><br />
</form>


If I change the from to GET and look for a GET
// SUCCESS: This returns 1
if(isset($_GET['senderName'])){
	$msg = 1;	
} else {
	$msg = -1;
}

echo $msg;

<form action="sendCard.php" method="GET">
<input name="senderName" value="" type="text" size="60" maxlength="60" /><br />
<input name="send" type="submit" /><br />
</form>



Expected result:
----------------
Both should return 1.

Actual result:
--------------
-1 on $_POST.

INI is relatively untouched past standard dir paths and cgi redirect disable, no 3rd party extensions.

looks like "#37276 problems witch $_POST array" but not fixed in windows... 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-10 18:55 UTC] tony2001@php.net
Disable all firewalls and make sure your browser actually send this data.
 [2006-12-11 14:50 UTC] mpaige at ryanidirect dot com
I am behind the firewall on the 2003 box, and on my local developement copy there is no firewall.
 [2006-12-11 14:56 UTC] iliaa@php.net
What is your variables_order set to?
 [2006-12-11 14:59 UTC] mpaige at ryanidirect dot com
variables_order = "GPCS"
 [2006-12-11 15:06 UTC] mpaige at ryanidirect dot com
just switched them PGCS and the $_post and the $_get no work (variables_order = "PGCS").  Are their implications to this or is this resolved?
 [2006-12-11 15:36 UTC] mpaige at ryanidirect dot com
TYPO: when post and get are reversed (PG), post and get both NOW work.
 [2006-12-11 15:46 UTC] tony2001@php.net
Please post your phpinfo() somewhere and put the link here.
 [2006-12-11 15:55 UTC] mpaige at ryanidirect dot com
as requested (view source):
http://167.206.191.45/php.html
 [2006-12-11 16:04 UTC] tony2001@php.net
phpinfo(), please. Not php.ini.
 [2006-12-11 16:35 UTC] mpaige at ryanidirect dot com
http://167.206.191.45/php2003.php
http://167.206.191.45/phpXPsp2.html
 [2007-01-20 23:03 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2007-01-24 13:48 UTC] php at michasch dot de
Same problem here.

WinXP SP2 Ger Apache 2.2, PHP 5.2.0

Yesterday i tried with a current snapshot, but the error still remains.

Apache/2.2.3 (Win32) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.1RC4-dev Server at localhost Port 80

PHP Version 5.2.1RC4-dev
System 	Windows NT COMPUTERNAME 5.1 build 2600
Build Date 	Jan 23 2007 16:17:13
 [2007-01-28 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2007-02-06 22:52 UTC] dan dot marsden at gmail dot com
I have this issue with IE 7 - $_POST is empty   - works with FF fine though.....
 [2007-03-11 14:24 UTC] webmaster at whatsthescuttlebutt dot com
I am having this problem as well.  I have a PHP page with multiple 
forms, one that uses the GET method and several that use the POST method 
(the POST forms are part of a content star rating system).  Everything 
works great in Firefox and Safari, but in IE7 the POST variable is empty 
when the user submits the form with POST method (the action of that form 
is the full URI which contains GET names/values, so I am using GET and 
POST at the same time).  I tried changing the order as suggested but 
that did not solve the problem.  Since it works in other browsers, I 
assume my code and syntax is correct and that this is some issue with 
IE?  I don't have access to older versions of IE to see if it is 
occurring in IE6.
 [2007-04-07 19:48 UTC] wolfgang dot nagele at gmail dot com
In my case this happend because someone increased the value of post_max_size to 32 (formerly 8), but just increased upload_max_filesize to 4 (from 2). So it seems this brings up a slight problem, which seems obvious to me - but should be mentioned somewhere in php.ini at least.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 08:02:42 2024 UTC