Edit report at http://bugs.php.net/bug.php?id=42516&edit=1
ID: 42516 Comment by: tyra3l at gmail dot com Reported by: michael at zedeler dot dk Summary: __FILE__ resolves symlinks Status: Assigned Type: Feature/Change Request Package: Scripting Engine problem Operating System: Linux PHP Version: 4.4.7 Assigned To: bjori Block user comment: N Private report: N New Comment: $_SERVER["SCRIPT_FILENAME"] can be used for getting the non-resolved path, and the documentation at http://php.net/manual/en/language.constants.predefined.php now contains info about __FILE__ is resolved to absolute path with resolved symlinks. so I think that this could be closed. Tyrael Previous Comments: ------------------------------------------------------------------------ [2009-08-17 12:57:30] michael at zedeler dot dk Fixed subject. ------------------------------------------------------------------------ [2009-08-17 12:56:08] michael at zedeler dot dk Moved to Feature/Change request category. ------------------------------------------------------------------------ [2009-04-24 05:58:24] bj...@php.net Please use the developers mailinglist for feature discussions (intern...@lists.php.net). ------------------------------------------------------------------------ [2009-04-23 17:53:20] michael at zedeler dot dk Sorry to bug you again, but as I am writing in the report, just putting a description of the errant behaviour is not a useful fix. ------------------------------------------------------------------------ [2007-09-01 21:02:38] michael at zedeler dot dk Description: ------------ __FILE__ does not return the path used to invoke the current file, but resolves symlinks. This behaviour is extremely problematics, since important information is thrown away. The web is teeming with postings from people that are experiencing problems because of this. In http://bugs.php.net/bug.php?id=37603 this bug was mentioned and the response was that it is intended behavior with a reference to the manual. The page http://es.php.net/manual/en/language.constants.predefined.php is the primary source of information for __FILE__, and it does not mention resolving symlinks at all. I'd like if we could have som kind of dialogue about how to solve the problem, in stead of just having this bug being closed with a "Bogus" status. My suggestions are: 1) introduce a new magical constant that behaves as it should. 2) put a parameter in php.ini that changes how __FILE__ behaves. Reproduce code: --------------- This is basically a reopening of http://bugs.php.net/bug.php?id=37603 Expected result: ---------------- This is basically a reopening of http://bugs.php.net/bug.php?id=37603 Actual result: -------------- This is basically a reopening of http://bugs.php.net/bug.php?id=37603 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=42516&edit=1