From:             
Operating system: Linux/Ubuntu 11.10
PHP version:      5.4SVN-2012-01-23 (snap)
Package:          Built-in web server
Bug Type:         Bug
Bug description:Built in web server does not set $_SERVER['SCRIPT_FILENAME'] 
when using router

Description:
------------
Nothing special done when compiling, just --configure and then make.

If the webserver couldn't do any path translation,
$_SERVER['SCRIPT_FILENAME'] is not populated. If this is desired behaviour,
perhaps the documentation should be updated, as existing software will rely
on it.

----

Given the code below in router.php, and starting the web server with a
router
> ~/Downloads/php5.4-201201231230/sapi/cli/php -S localhost:8000
router.php

Fetch the root url, NULL returned

> curl localhost:8000
NULL

Given that this variable is documented, I'd expect it to be string(29)
"/home/davem/temp_ws/router.php"

Touching a file called index.php, seems to trick the webserver in to
thinking it's done a path translation for the root url

> touch index.php
> curl localhost:8000
string(29) "/home/davem/temp_ws/index.php"



Test script:
---------------
router.php

<?php
var_dump($_SERVER['SCRIPT_FILENAME']);
return true;



Expected result:
----------------
string(29) "/home/davem/temp_ws/router.php"

Actual result:
--------------
NULL

-- 
Edit bug report at https://bugs.php.net/bug.php?id=60850&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=60850&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=60850&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=60850&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=60850&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60850&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=60850&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=60850&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=60850&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=60850&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=60850&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=60850&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=60850&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=60850&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=60850&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=60850&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=60850&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=60850&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=60850&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=60850&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=60850&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=60850&r=mysqlcfg

Reply via email to