#31553 [Opn]: include does not follow symlinks starting with ..

From: Date: Fri, 14 Jan 2005 14:00:40 +0000
Subject: #31553 [Opn]: include does not follow symlinks starting with ..
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-72145@lists.php.net to get a copy of this message
ID: 31553 User updated by: pterjan at linuxfr dot org Reported By: pterjan at linuxfr dot org Status: Open Bug Type: Scripting Engine problem Operating System: Mandrakelinux PHP Version: 4.3.10 New Comment: Just tested with PHP 5.0.2, the problem does not occur. Previous Comments: ------------------------------------------------------------------------ [2005-01-14 14:55:35] pterjan at linuxfr dot org Description: ------------ include does not follow symlinks starting with .. Reproduce code: --------------- [pterjan@dhcp122 php-test]$ pwd /tmp/php-test [pterjan@dhcp122 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/ [pterjan@dhcp122 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 [pterjan@dhcp122 php-test]$ php -r 'include("a/foo.php");' [pterjan@dhcp122 php-test]$ php -r 'include("b/foo.php");' [pterjan@dhcp122 php-test]$ php -r 'include("c/foo.php");' [pterjan@dhcp122 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 [pterjan@dhcp122 php-test]$ php -r 'include("e/foo.php");' [pterjan@dhcp122 php-test]$ php -r 'include("f/foo.php");' ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31553&edit=1

« previous php.bugs (#72145) next »