From: mattb at columbia dot edu
Operating system: RedHat 8.0
PHP version: 4.3.1
PHP Bug Type: Scripting Engine problem
Bug description: $_SERVER['SCRIPT_URI'] missing port number for implied index file
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.
--
Edit bug report at http://bugs.php.net/?id=22261&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22261&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=22261&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=22261&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22261&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=22261&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=22261&r=support
Expected behavior: http://bugs.php.net/fix.php?id=22261&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=22261&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=22261&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=22261&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22261&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=22261&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=22261&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=22261&r=gnused