PHP 4.0 Bug #6385 Updated: __FILE__ returns lowercased filenames

From: Date: Mon, 08 Jan 2001 20:40:35 +0000
Subject: PHP 4.0 Bug #6385 Updated: __FILE__ returns lowercased filenames
Groups: php.dev 
Request: Send a blank email to php-dev+get-43455@lists.php.net to get a copy of this message
ID: 6385 Updated by: cynic Reported By: waldschrott@php.net Status: Analyzed Old-Bug Type: IIS related Bug Type: Scripting Engine problem Assigned To: Comments: not IIS-specific, reclassifying Previous Comments: --------------------------------------------------------------------------- [2000-11-04 06:34:12] waldschrott@php.net tested on CGI+ApacheMod, both return lowercased --------------------------------------------------------------------------- [2000-08-31 09:02:16] stas@php.net Does this happen with CGI version? I suspect it might be just IIS which sets your filename lowercase... --------------------------------------------------------------------------- [2000-08-27 21:28:47] waldschrott@php.net if I´m calling a file "FooBar.php", echo __FILE__; will output "foobar.php". Although w32 allows files only in-sensitive (no FooBar.php and foobar.php concurrently) it saves the case information and thus __FILE__ (and related) should contain this cased information too. This will bug will also cause scripts not to be platform independend: // filename lowercased $filename=basename(__FILE__); // HTTP REQUEST, w cased filename $fullpage=substr($tmp=strtolower(getenv('SERVER_PROTOCOL')),0,strpos($tmp,'/')).'://'.getenv('HTTP_HOST').getenv('REQUEST_URI'); $pageonly=substr($fullpage,0,strpos($fullpage,$filename)+strlen($filename)); hile this script should work on *nix calling "foobar.php" it does not on w32 --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=6385

« previous php.dev (#43455) next »