Bug #60017 [Com]: __FILE__ case inconsistency on Mac / MAMP
| From: | karcieri at gmail dot com | Date: | Sat, 08 Oct 2011 23:39:39 +0000 |
| Subject: | Bug #60017 [Com]: __FILE__ case inconsistency on Mac / MAMP | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-164177@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60017&edit=1
ID: 60017
Comment by: karcieri at gmail dot com
Reported by: ykessler at gmail dot com
Summary: __FILE__ case inconsistency on Mac / MAMP
Status: Open
Type: Bug
Package: Filesystem function related
Operating System: Mac OSX
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Environment:
---------------
Zend Server version: 5.1.0
Test script:
---------------
Same as bug report
Actual result:
--------------
__FILE__ = /usr/local/zend/apache2/htdocs/Test
__DIR__ = /usr/local/zend/apache2/htdocs/Test
__FILE__ = /usr/local/zend/apache2/htdocs/Test
__DIR__ = /usr/local/zend/apache2/htdocs/Test
Is it possible that this bug is only related to the Users directory?
Previous Comments:
------------------------------------------------------------------------
[2011-10-08 21:51:37] ykessler at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/language.constants.predefined
---
__FILE__ and __DIR__, return lower case paths when in the calling file, and mixed
case paths in an included file, when run on MAMP.
Test script:
---------------
//The following will show all lower case paths when in the calling file,
//and mixed case paths in an included file, when run on MAMP.
echo "<br/>__FILE__ = ".__FILE__;
echo "<br/>__DIR__ = ".__DIR__;
// include another file with the same code ...
Actual result:
--------------
__FILE__ = /users/me/stuff/mamp_server/my_site/myfile.php
__DIR__ = /users/me/stuff/mamp_server/my_site
__FILE__ = /Users/me/Stuff/mamp_server/my_site/myfile.php
__DIR__ = /Users/me/Stuff/mamp_server/my_site
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60017&edit=1