ID: 14734
Updated by: mfischer
Reported By: [EMAIL PROTECTED]
Old Summary: default HTTP vars and PHP_SELF not available
Old Status: Bogus
Status: Open
Old Bug Type: Scripting Engine problem
Bug Type: Documentation problem
Operating System: Win XP
PHP Version: 4.1.0
New Comment:

Valid point. I'm reopening this as a documentation problem.

Previous Comments:
------------------------------------------------------------------------

[2001-12-28 10:01:35] [EMAIL PROTECTED]

Hi All,

Thanks for the replies. The docs tell me that using globally registered vars presents 
a security risk and is being turned off in future versions anyway, so it's quite 
necessary to get accustomed to it.

Using $_SERVER['PHP_SELF'] must be the way to go.

However, where to find proper documentation on these 'new' vars ? I can't find them, 
only some pages mentioning they exist.. 

------------------------------------------------------------------------

[2001-12-28 09:56:13] [EMAIL PROTECTED]

The correct way would be to use $_SERVER['PHP_SELF'] ; this is guaranteed to work with 
and without register_globals = off.

------------------------------------------------------------------------

[2001-12-28 09:34:57] [EMAIL PROTECTED]

Then don't turn register_globals off.  Turning off register_globals gets rid of all 
the globals.  If you still want some, leave it turned on, but simply set your 
variables_order directive in your php.ini file to reflect which globals you want.  For 
example, if you want environment and server variables, set it to "ES"

------------------------------------------------------------------------

[2001-12-28 09:31:19] [EMAIL PROTECTED]

When using PHP with track_vars On and register_globals Off (recommended setting), PHP 
doesn't know the built-in system and environment vars anymore.

For example, $PHP_SELF becomes and unknow variable.

This is really annoying.

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=14734&edit=1

Reply via email to