PHP 4.0 Bug #5167: include() function works incorrectly with directories - symbolic links

From: Date: Wed, 21 Jun 2000 09:01:12 +0000
Subject: PHP 4.0 Bug #5167: include() function works incorrectly with directories - symbolic links
Groups: php.dev 
Request: Send a blank email to php-dev+get-22131@lists.php.net to get a copy of this message
From: kir@astrive.ru Operating system: Solaris 7 x86 PHP version: 4.0 Latest CVS (21/06/2000) PHP Bug Type: Misbehaving function Bug description: include() function works incorrectly with directories - symbolic links I have the following files/content structure: magnat!kir$ ls -lR .: total 6 drwxr-xr-x 2 kir staff 512 Jun 21 12:39 a1 drwxr-xr-x 2 kir staff 512 Jun 21 12:47 a2 -rw-r--r-- 1 kir staff 17 Jun 21 12:49 test_file.php ./a1: total 2 lrwxrwxrwx 1 kir staff 5 Jun 21 12:39 link -> ../a2 ./a2: total 2 -rw-r--r-- 1 kir staff 35 Jun 21 12:49 a.php magnat!kir$ cat test_file.php <? echo "Hi"; ?> magnat!kir$ cat a2/a.php <? include("../test_file.php"); ?> When I try to access page a1/link/a.php from PHP3, I get the phrase 'Hi' as expected. When I try to access this page from PHP4, I get: Warning: Failed opening '../test_file.php' for inclusion (include_path='.:./config:../config:../include:./include:./utillibs:../phplib:../../phplib:../../include:../../../phplib:../../../include:../../../../phplib:../../../../include') in /my/path/TEST/a/a1/link/a.php on line 2

« previous php.dev (#22131) next »