ID: 36706 Updated by: [EMAIL PROTECTED] Reported By: coshellking at yahoo dot com dot ph -Status: Open +Status: Bogus Bug Type: CGI related Operating System: Fedora 3 PHP Version: 5.1.2 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php QUERY_STRING is just an environment variable, thus $_SERVER contains it. The CLI SAPI does not attempt to fill the request superglobals. Use parse_str($_SERVER['QUERY_STRING'], $_GET), but I strongly discourage from abusing the CLI SAPI as CGI SAPI. Previous Comments: ------------------------------------------------------------------------ [2006-03-12 19:39:11] coshellking at yahoo dot com dot ph 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 this bug report at http://bugs.php.net/?id=36706&edit=1