#36706 [NEW]: $_GET always empty
| From: | coshellking at yahoo dot com dot ph | Date: | Sun, 12 Mar 2006 18:39:12 +0000 |
| Subject: | #36706 [NEW]: $_GET always empty | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-94228@lists.php.net to get a copy of this message | ||
From: coshellking at yahoo dot com dot ph
Operating system: Fedora 3
PHP version: 5.1.2
PHP Bug Type: CGI related
Bug description: $_GET always empty
Description:
------------
Cannot retrieve any value from $_GET eventhough the parameters entered
appear correctly in $_SERVER['QUERY_STRING'].
Reproduce code:
---------------
#!/usr/local/bin/php
<?php
print ("Content-type: text/plain\r\n\r\n");
print ("foo is {$_GET['foo']}\r\n");
print ("GET array is \r\n");
print_r ($_GET);
print ("Request array is \r\n");
print_r ($_REQUEST);
print ("Server query string is \r\n");
print ($_SERVER['QUERY_STRING']);
?>
Executed URL: http://localhost/cgi-bin/test.php?foo=bar
Expected result:
----------------
foo is bar
GET array is
Array
(
foo => bar
)
Request array is
Array
(
foo => bar
)
Server query string is
foo=bar
Actual result:
--------------
foo is
GET array is
Array
(
)
Request array is
Array
(
)
Server query string is
foo=bar
--
Edit bug report at http://bugs.php.net/?id=36706&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36706&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36706&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36706&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36706&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36706&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36706&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36706&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36706&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36706&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36706&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36706&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36706&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36706&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36706&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36706&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36706&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36706&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36706&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36706&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36706&r=mysqlcfg