php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19625 QUERY_STRING returns as NULL
Submitted: 2002-09-26 15:20 UTC Modified: 2002-09-26 16:53 UTC
From: mwhited at mail dot eastland dot k12 dot oh dot us Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.2.3 OS: Linux Slackware 8.1
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: mwhited at mail dot eastland dot k12 dot oh dot us
New email:
PHP Version: OS:

 

 [2002-09-26 15:20 UTC] mwhited at mail dot eastland dot k12 dot oh dot us
I am Using PHP 1.2.3 and Apache 1.3.26

When you submit a form or click on a link the $QUERY_STRING is being nulled.  I figured out a simple (but unsecure) work around.

-WORK AROUND-
Create a file with the contents below
<? $QUERY_STRING=$HTTP_SERVER_VARS['QUERY_STRING']; ?>

Then add that file to the value auto_prepend_file in the php.ini and set the register_globals = on in the same file

This fixed my Problem but I hope there is a better solution

-Matthew Whited

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-26 16:53 UTC] iliaa@php.net
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php

Thank you for your interest in PHP.

QUERY_STRING only contains the data passed via GET. So, when you submit a form via POST method or click on a link that does not have any variables passed via GET then obviously the QUERY_STRING will be blank.
If this is not the case please re-open the bug with a correct PHP version.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Feb 21 06:00:01 2026 UTC