php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #11833 Unsufficient docs
Submitted: 2001-07-02 06:53 UTC Modified: 2002-01-02 19:54 UTC
From: M dot Izydorski at rubikon dot pl Assigned: danbeck (profile)
Status: Closed Package: Documentation problem
PHP Version: 4.0.6 OS: any
Private report: No CVE-ID: None
 [2001-07-02 06:53 UTC] M dot Izydorski at rubikon dot pl
There isn't enough information, from which assosiative array we can acces to predefined variables, when register globals is not set. Espesially $PHP_SELF isn't in $HTTP_ENV_VARS but $HTTP_SERVER_VARS, which mean not intuos (in my opinion) localization.

Regards

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-02 07:06 UTC] goba@php.net
$PHP_SELF is not an environment variable, nor a server variable, it is a special PHP variable, so it wont be registered in any arrays you listed
 [2001-07-02 07:13 UTC] M dot Izydorski at rubikon dot pl
I don't agree.

I just disable register_global by setting it Off.

Now I can't acces simply $PHP_SELF - returned string is empty.
When I get $HTTP_SERVER_VARS["PHP_SELF"], the return string is such as the $PHP_SELF with register_global "On".

Maybe it isn't docs bug, but devel bug?
 [2001-07-02 10:21 UTC] danbeck@php.net
It's very hard to understand what you are saying... please forgive us if we don't quite get your point.

Are you saying that the documentation is not clear as to which variables you can access using the $HTTP_ENV_VARS and $HTTP_SERVER_VARS.  If this is what you are asking, then please read the 3rd paragraph and the note that follows at:

http://php.net/manual/en/language.variables.predefined.php

The manual can not be an exhaustive resource for all predefined variables.  The best way to see exactly what is available to you is the check the output of the phpinfo() function.  It describes everthing you would need to know about the PHP environment and it's predefined variables in gratuitous detail.

Also, you specifically mention $PHP_SELF.  You say that it's not intuitive to be in HTTP_SERVER_VARS?  But it is.. it has noting to do with the system environment ($HTTP_ENV_VARS), but everything to do with the server environment.  It's the filename part of the URI, not the actual filename on the server.
 [2001-07-03 10:28 UTC] danbeck@php.net
Assigning this to myself. (I must love the pain...)
 [2002-01-02 19:42 UTC] imajes@php.net
No feedback.
 [2002-01-02 19:54 UTC] philip@php.net
This is essentially a duplicate, see bug #14472 for a more exaustive report.  Anyone want to tackle it? :-)

Regarding #11833, essentially this man page is geared towards register_globals = on when it shouldn't be.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 13:01:29 2024 UTC