Req #60017 [Fbk->NoF]: __FILE__ case inconsistency on Mac / MAMP

From: Date: Sun, 01 Aug 2021 04:22:08 +0000
Subject: Req #60017 [Fbk->NoF]: __FILE__ case inconsistency on Mac / MAMP
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-235509@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 Updated by: php-bugs@lists.php.net Reported by: ykessler at gmail dot com Summary: __FILE__ case inconsistency on Mac / MAMP -Status: Feedback +Status: No Feedback Type: Feature/Change Request Package: Filesystem function related Operating System: Mac OSX PHP Version: Irrelevant Assigned To: cmb Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: ------------------------------------------------------------------------ [2021-07-20 11:10:11] cmb@php.net Is this still an issue with any of the actively supported PHP versions[1]? However, even if so, I wouldn't classify this as bug, since on case-insensitive filesystem, case doesn't really matter. Still, it would be nice to handle that like on Windows. [1] <https://www.php.net/supported-versions.php> ------------------------------------------------------------------------ [2012-01-23 22:30:17] gmblar+php at gmail dot com This happens because the default filesystem (hfs+) is case insensitive. a.php <?php include strtolower(realpath('b.php')); include strtoupper(realpath('b.php')); b.php <?php var_dump(__FILE__); Output: string(23) "/users/blar/sites/b.php" string(23) "/USERS/BLAR/SITES/B.PHP" ------------------------------------------------------------------------ [2011-11-05 01:10:44] pjb109 at hotmail dot com Trying to write to a php file but not possible on MAMP. Instead tried to echo the line '<?php $var = "abc"; ?>' and this is also not possible?? Any ideas. ------------------------------------------------------------------------ [2011-10-16 13:30:43] ykessler at gmail dot com Here is another test run outside the Users directory, in the standard MAMP install under Applications/MAMP/htdocs: a.php: <?php echo "<br/>__FILE__ = ".__FILE__; echo "<br/>__DIR__ = ".__DIR__; include("a_inc.php"); ?> a_inc.php: <?php echo "<br/>__FILE__ = ".__FILE__; echo "<br/>__DIR__ = ".__DIR__; ?> http://localhost/tests/a.php = __FILE__ = /applications/mamp/htdocs/tests/a.php __DIR__ = /applications/mamp/htdocs/tests __FILE__ = /Applications/MAMP/htdocs/tests/a_inc.php __DIR__ = /Applications/MAMP/htdocs/tests Zend Engine v2.3.0 OSX 10.6.8 Apache/2.0.63 (Unix) PHP/5.3.2 DAV/2 ------------------------------------------------------------------------ [2011-10-08 23:39:39] karcieri at gmail dot com 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? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=60017 -- Edit this bug report at https://bugs.php.net/bug.php?id=60017&edit=1

« previous php.bugs (#235509) next »