|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24562 Server variables are invisible with register_globals on
Submitted: 2003-07-09 08:55 UTC Modified: 2003-07-09 10:05 UTC
From: sagi at boom dot org dot il Assigned:
Status: Closed Package: Variables related
PHP Version: 4.3.3RC1 OS: RedHat 8.0 (Linux 2.4.20)
Private report: No CVE-ID: None
 [2003-07-09 08:55 UTC] sagi at boom dot org dot il
After upgrading to PHP4.3.3RC1 server variables such as $REQUEST_URI are only accessible using $_SERVER[var], with register_globals turned ON.

You can see running example on my server:

The source is at:

Reproduce code:
print "\$REQUEST_URI is: $REQUEST_URI\n";

Expected result:
$REQUEST_URI is: /~sagi/php/servar.php?getvar=hello
$_SERVER[REQUEST_URI] is: /~sagi/php/servar.php?getvar=hello

Actual result:
$_SERVER[REQUEST_URI] is: /~sagi/php/servar.php?getvar=hello


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-09 09:54 UTC]
In PHP 4.2.0, the 'register_globals' setting default changed to
'off'. See for more info.
We are sorry about the inconvenience, but this change was a necessary
part of our efforts to make PHP scripting more secure and portable.

 [2003-07-09 09:58 UTC] sagi at boom dot org dot il
I know that, thats not the problem.

I upgraded from PHP4.3.2 where it works just fine.

Like I said, my register_globals IS turned *ON*.

See my example url. I even echo $getvar to make sure that its not a problem with register globals and phpinfo() says that its on.
 [2003-07-09 10:05 UTC]
Please try using this CVS snapshot:
For Windows:

Then this must be fixed in latest stable CVS of PHP_4_3 branch since I can't reproduce this.

Try the snapshot.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Sep 26 07:03:37 2021 UTC