php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12475 the variable $PHP_SELF is not set.
Submitted: 2001-07-30 21:12 UTC Modified: 2002-05-14 14:33 UTC
From: remco at panviva dot com Assigned:
Status: Closed Package: Variables related
PHP Version: 4.0.6 OS: Windows 2000 Server
Private report: No CVE-ID: None
 [2001-07-30 21:12 UTC] remco at panviva dot com
if I open a script containing only the phpinfo() function, the $PHP_SELF field is not filled in. In my own scripts it's not setted at all.

I'm using the zipped version of php4.06 with cgi wrapper using xitami 2.4d6 running as a windows service.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-15 17:35 UTC] irc-html@php.net
Was able to verify this.  Anyone able to provide any information about why this occurs?
 [2001-12-24 10:06 UTC] sander@php.net
Can you try 4.1.0 or even 4.1.1 (when it's out) or the latest CVS (snaps.php.net)?
 [2002-01-14 02:07 UTC] lobbin@php.net
No feedback, closing.
 [2002-02-23 12:00 UTC] jeff11 at gondon dot net
Hi. I also have this Problem, even with the newest version of PHP (4.1.1, using the *.msi file). I'm using Xitami, but I can't be that, because when using PHP3, all works well.

Is there a fix?
 [2002-05-14 07:27 UTC] oliver dot vesper at ollinux dot de
I had the same problem using PHP 4.1.2 and still have the problem using 4.2.1. Platform is Linux and Apache 1.3.24.
 [2002-05-14 07:30 UTC] oliver dot vesper at ollinux dot de
but you can use $_SERVER['PHP_SELF'] to access PHP_SELF. maybe $PHP_SELF doesn't exist anymore?!
 [2002-05-14 14:33 UTC] philip@php.net
Typically register_globals = on is what creates $PHP_SELF.  register_globals affects many variables, SERVER ones too. 

If you really want $PHP_SELF to exist then try:

if (!ini_get('register_globals')) {
    extract($HTTP_SERVER_VARS);
}

This may or may not be a solution to the original bug report, but is regarding Oliver's and perhaps Jeff's.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 22:01:27 2024 UTC