php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29725 variable $HTTP_SERVER_VARS['PHP_SELF'] does not exist or it's clear
Submitted: 2004-08-18 00:53 UTC Modified: 2004-08-18 08:21 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mex at localnet dot sk Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.0.1 OS: Windows XP SP1a
Private report: No CVE-ID: None
 [2004-08-18 00:53 UTC] mex at localnet dot sk
Description:
------------
variable $HTTP_SERVER_VARS['PHP_SELF'] does not exist or it's clear

Reproduce code:
---------------
on windows xp sp1a I get clear page:

<?php
echo $HTTP_SERVER_VARS['PHP_SELF'];
?>

on freebsd 5.2-cvs i get right reply



Expected result:
----------------
variable may be filled with relative path to actual script

Actual result:
--------------
variable is clear (or null?)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-18 00:57 UTC] scottmacvicar at ntlworld dot com
Sorry, but your problem does not imply a bug in PHP itself.  For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. 

Check your php.ini and make sure you register the old-style 
vars, this was a change made for PHP 5.
 
register_long_arrays = On
 [2004-08-18 01:28 UTC] mex at localnet dot sk
ok, but reference is the same for php 4 and php 5, without any notice about "register_long_arrays = On".
 [2004-08-18 08:21 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

It depends on the webserver whether it is set or not, not really much something that PHP can do about.

To: scottmacvicar at ntlworld dot com, don't update the bugreports with quickfixes if you don't know what you're talking about.
 [2010-12-02 11:28 UTC] vsraju dot vegesna at gmail dot com
why use $HTTP_SERVER_VARS['PHP_SELF'] variable in onchange event in JavaScript's php.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 28 07:00:02 2025 UTC