Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Predefined variables not available?

Status
Not open for further replies.

Streetdaddy

Programmer
Jun 10, 1999
161
AU
I have just reinstalled PHP 4.2.1 on XP. The site I am trying to get working with the new install is giving the following error when attempting to return $_SERVER["QUERY_STRING"]

Notice: Undefined index: QUERY_STRING in c:\blah

I am having the same problem with all predefined variables, like $_POST etc. Is there anything special I need to do to make these variables work? It all worked fine in my previous php install... Miles

Those Micros~1 guys sure know what they doing!
 
Have you tried doing a phpinfo();? It should show you the contents of $_POST, $_SERVER etc. Try retrieving the page with script?testing=1 and see if PHP picks it up. //Daniel
 
I worked out that it was to do with the Error reporting. Previously it seems that the site was reporting errors that I wasn't aware of, such as $_SERVER["QUERY_STRING"] not being defined, but I was using that fact in the code. Its probably really bad practice but the site works now so I'll leave it as it is for now... I've set the error reporting back to E_ALL, ~E_NOTICES (or something like that) Miles

Those Micros~1 guys sure know what they doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top