ID: 31553 User updated by: pterjan at linuxfr dot org Reported By: pterjan at linuxfr dot org -Status: Feedback +Status: Closed Bug Type: Scripting Engine problem Operating System: Mandrakelinux PHP Version: 4.3.10 New Comment:
Works fine with the php4-STABLE-200501141530 I just built. I noticed the Mandrakelinux rpm is built with Hardened-PHP v0.2.4 and 0.2.5 annouces "- fixes the new realpath() implementation with some symlinks" so I guess this was the problem. Thanks. Previous Comments: ------------------------------------------------------------------------ [2005-01-14 17:33:34] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Or it's something wrong with your system. Works fine for me. ------------------------------------------------------------------------ [2005-01-14 15:00:40] pterjan at linuxfr dot org Just tested with PHP 5.0.2, the problem does not occur. ------------------------------------------------------------------------ [2005-01-14 14:55:35] pterjan at linuxfr dot org Description: ------------ include does not follow symlinks starting with .. Reproduce code: --------------- [EMAIL PROTECTED] php-test]$ pwd /tmp/php-test [EMAIL PROTECTED] php-test]$ ll total 4 drwxr-xr-x 2 pterjan pterjan 4096 jan 14 14:31 a/ lrwxrwxrwx 1 pterjan pterjan 1 jan 14 14:31 b -> a/ lrwxrwxrwx 1 pterjan pterjan 15 jan 14 14:31 c -> /tmp/php-test/a/ lrwxrwxrwx 1 pterjan pterjan 13 jan 14 14:31 d -> ../php-test/a/ lrwxrwxrwx 1 pterjan pterjan 3 jan 14 14:35 e -> ./a/ lrwxrwxrwx 1 pterjan pterjan 6 jan 14 14:48 f -> a/../a/ [EMAIL PROTECTED] php-test]$ ll */foo.php -rw-r--r-- 1 pterjan pterjan 0 jan 14 14:31 a/foo.php -rw-r--r-- 1 pterjan pterjan 0 jan 14 14:31 b/foo.php -rw-r--r-- 1 pterjan pterjan 0 jan 14 14:31 c/foo.php -rw-r--r-- 1 pterjan pterjan 0 jan 14 14:31 d/foo.php -rw-r--r-- 1 pterjan pterjan 0 jan 14 14:31 e/foo.php -rw-r--r-- 1 pterjan pterjan 0 jan 14 14:31 f/foo.php [EMAIL PROTECTED] php-test]$ php -r 'include("a/foo.php");' [EMAIL PROTECTED] php-test]$ php -r 'include("b/foo.php");' [EMAIL PROTECTED] php-test]$ php -r 'include("c/foo.php");' [EMAIL PROTECTED] php-test]$ php -r 'include("d/foo.php");' Warning: Unknown(d/foo.php): failed to open stream: No such file or directory in Command line code on line 1 Warning: (null)(): Failed opening 'd/foo.php' for inclusion (include_path='.:/usr/lib/php/:/usr/share/pear/') in Command line code on line 1 [EMAIL PROTECTED] php-test]$ php -r 'include("e/foo.php");' [EMAIL PROTECTED] php-test]$ php -r 'include("f/foo.php");' ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31553&edit=1
