[php-src] Issue #15000: symlinks ignored in stack trace file paths

From: Date: Wed, 17 Jul 2024 21:55:52 +0000
Subject: [php-src] Issue #15000: symlinks ignored in stack trace file paths
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-247311@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/15000 Author: lc1337 ### Description #### Summary Stack trace (from debug_backtrace(), exceptions, errors ..) show always absolute/real/evaluated file paths, even though the script was run form symlink context. #### How to reproduce 1. Create a directory "d2" and a symlink to that directory "d1" ``` mkdir D:\d2 mklink /D "D:\d1" "D:\d2" ``` 2. Create "D:\d2\test.php" script ``` <?php var_dump($argv); (function(){ var_dump(debug_backtrace()); })(); ``` 3. Run script using symlink path php.exe D:\d1\test.php #### Current behavior ``` array(1) { [0]=> string(14) "D:\d1\test.php" } array(1) { [0]=> array(4) { ["file"]=> string(14) "D:\d2\test.php" ["line"]=> int(8) ["function"]=> string(9) "{closure}" ["args"]=> array(0) { } } } ``` #### Expected behavior ``` array(1) { [0]=> string(14) "D:\d1\test.php" } array(1) { [0]=> array(4) { ["file"]=> string(14) "D:\d1\test.php" ["line"]=> int(8) ["function"]=> string(9) "{closure}" ["args"]=> array(0) { } } } ... ``` ### PHP Version 8.3.9 ### Operating System Windows

« previous php.bugs (#247311) next »