php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28109 CGI mode: $PHP_SELF incorrect
Submitted: 2004-04-22 17:05 UTC Modified: 2004-04-22 18:35 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: bertrand at linkeo dot com Assigned:
Status: Closed Package: CGI/CLI related
PHP Version: 4.3.4 OS: GNU/Linux Debian
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bertrand at linkeo dot com
New email:
PHP Version: OS:

 

 [2004-04-22 17:05 UTC] bertrand at linkeo dot com
Description:
------------
While used in CGI mode, $PHP_SELF seems not to be set to the correct value:

_SERVER["PHP_SELF"] => /var/www/vhs-testsuite/bar.tld/foo.php

I also noticed this:

SCRIPT_NAME => /foo.php
_SERVER["SCRIPT_NAME"] => /var/www/vhs-testsuite/bar.tld/foo.php
_ENV["SCRIPT_NAME"] => /foo.php

_SERVER["SCRIPT_NAME"] seems not to follow the environment variables data.


Bug described here:http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0302/msg00540.html




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-22 18:23 UTC] bertrand dot lupart at linkeo dot com
Tried with 4.3.6, and it seems solved while it isn't mentioned in the Changelog.
 [2004-04-22 18:35 UTC] iliaa@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 10:01:38 2025 UTC