Koozali.org: home of the SME Server

PHP and Symlinks

Dan Smith

PHP and Symlinks
« on: April 30, 2003, 07:40:01 PM »
Folks -  I'm getting some strange behavior (or behaviour for you BritEng speakers) on my 5.6 server concerning some PHP scripts and symlinks.  It's a package called Netjuke, which allows for cataloging and streaming of audio files (MP3s etc).  It's all written in PHP and associated HTML pages, and has a module that reads the audio files for some tags that contain track name, artist, etc (ID3 tags to be specific).  The strange behavior is the PHP script can see the files and read the ID3 tags perfectly when I put the files below the HTML directory in the ibay where Netjuke is installed, but if I symlink to the same files in another directory (via a symlink below the HTML directory), the script can "see" the files, but can't open them and read the tags.  I've CHMOD'd all the files/dirs and the symlink to 777, and turned on FollowSymlinks in apache.  No luck.  Is there some restriction to the way PHP scripts can follow symlinks, or read the files below a symlink?  Any other thoughts?