php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70642 $_SERVER['SCRIPT_NAME'] includes drive letter
Submitted: 2015-10-05 12:16 UTC Modified: 2015-10-10 10:32 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: hiitsaaron at googlemail dot com Assigned: ab (profile)
Status: Closed Package: *General Issues
PHP Version: 5.6.14 OS: Windows 7 64-bit
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: hiitsaaron at googlemail dot com
New email:
PHP Version: OS:

 

 [2015-10-05 12:16 UTC] hiitsaaron at googlemail dot com
Description:
------------
$_SERVER['SCRIPT_NAME'] reports incorrect location as it includes the drive letter.

Test script:
---------------
<?php

    echo '$_SERVER[\'SCRIPT_NAME\'] // ' . $_SERVER['SCRIPT_NAME'];

?>

Expected result:
----------------
$_SERVER['SCRIPT_NAME'] // index.php


Actual result:
--------------
$_SERVER['SCRIPT_NAME'] // C:/index.php

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-10-05 23:12 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2015-10-05 23:12 UTC] requinix@php.net
Which SAPI? (eg, CLI, CGI, Apache module, FPM)
 [2015-10-06 00:18 UTC] hiitsaaron at googlemail dot com
-Status: Feedback +Status: Open
 [2015-10-06 00:18 UTC] hiitsaaron at googlemail dot com
Apache 2.4.9 from ApacheLounge http://www.apachelounge.com/download/

Server version: Apache/2.4.9 (Win64)
Apache Lounge VC11 Server built:   Mar 16 2014 12:42:59
Architecture:   64-bit

and php 5.5.10 from http://windows.php.net/download

PHP 5.5.10 (cli) (built: Mar  5 2014 14:49:07)

Although, I've just been doing some housecleaning and I've updated all these to Apache/2.4.16 (Win64) and PHP 5.6.14 and the issue has gone away *yay*. All $_SERVER variables look good, and normal. I still have a back up of my original builds that this happened if anyone is interested, I can try and set them back up again and re-attempt to create this bug. But personally this is solved for me.
 [2015-10-10 10:32 UTC] ab@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: ab
 [2015-10-10 10:32 UTC] ab@php.net
Ok, since you cannot reproduce it anymore, closing. Please feel free to report again if the misbehavior persists. I myself couldn't reproduce it myself as well, with IIS and Apache.

Thanks.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jun 02 22:01:27 2025 UTC