Symbolic Links, Includes, and Relative Paths

From: Date: Fri, 08 Mar 2002 16:30:13 +0000
Subject: Symbolic Links, Includes, and Relative Paths
Groups: php.general 
Request: Send a blank email to php-general+get-87789@lists.php.net to get a copy of this message
I'm on a red hat system, and I've soft-linked two directories: /www/dir1/subdir /www/dir2/subdir --> /www/dir1/subdir Now, inside subdir is a file that tries to include("../info.php"); which prints out some information about the file paths and my database stuff. So there's: /www/dir1/info.php /www/dir1/subdir/includer.php /www/dir2/info.php /www/dir2/subdir --> /www/dir1/subdir Now, when I run /www/dir2/subdir/includer.php, it SHOULD include the file "../info.php" which translates into /www/dir2/info.php. However, the symbolic linking seems to have messed it up, and instead of running dir2's info.php, it seems to think it is in dir1, and instead includes dir1's info.php file. Has anyone run into this and/or know a fix for it? Thanks! - Jonathan

« previous php.general (#87789) next »