php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22261 $_SERVER['SCRIPT_URI'] missing port number for implied index file
Submitted: 2003-02-17 17:34 UTC Modified: 2003-02-17 21:10 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mattb at columbia dot edu Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.3.1 OS: RedHat 8.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mattb at columbia dot edu
New email:
PHP Version: OS:

 

 [2003-02-17 17:34 UTC] mattb at columbia dot edu
I'm using PHP 4.3.1 with Apache 2.0.44 with the following directives set in my httpd.conf:

ServerRoot /var/www
# ...
Listen 8080
# ...
LoadModule php4_module lib/libphp4.so
# ...
AddType application/x-httpd-php .php .phtml .php4 .php3
AddType application/x-httpd-php-source .phps
# ...
Options Indexes
# ...
DirectoryIndex index.html index.php

I have one file in my server root: index.php:

- - - - - - - - %< CUT HERE >% - - - - - - - -

    <!-- File: index.php -->
    <pre>
    <?php
    var_dump($_SERVER['SCRIPT_URI']);
    ?>
    </pre>

- - - - - - - - %< CUT HERE >% - - - - - - - -

If I go to http://localhost:8080/index.php, I get the following output:

    <!-- File: index.php -->
    <pre>
    string(31) "http://localhost:8080/index.php"
    </pre>

However, if I go to http://localhost:8080/, I get the following output:

    <!-- File: index.php -->
    <pre>
    string(17) "http://localhost/"
    </pre>

This also happens with Apache 1.3.27 and an equivalent configuration.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-17 19:14 UTC] iliaa@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.

This information is fetched from the Apache server and provided as is without any modifications. Therefor this is not a bug in PHP, it may however be a bug in Apache.
 [2003-02-17 21:10 UTC] mattb at columbia dot edu
FYI: filed as Apache bug #17148:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17148
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 23:01:30 2024 UTC