Hi to all,
On a SME7.3 server, i've to manage a symlink between 2 bays.
The first one called "photo" without CGI,PHP,SSI activated (only a share on my LAN)
The second one called "test" with CGI,PHP,SSI activated. I've made some php for LAN use.
On this second bay, i create e symlink "toPhoto" to acces files on "photo" bay
From SSH console as root user this symlink works great.
I've autorised symlinks to work under http. Adding FollowSymlinks property to enabled to the "test" bay. And using browser it works (i can acces toPhoto and finally "photo" bay files)
Now the problem : to explain a little example
<?php
function rapport($path){
if ( is_dir($path) )
echo ($path.' dir<br>');
else
echo ($path.' NOT dir<br>');
if (is_readable($path))
echo ($path.' readable<br>');
else
echo ($path.' NOT readable<br>');
if (is_link($path))
echo ($path.' link <br>');
else
echo ($path.' NOT link <br>');
}
$prefix='.';
rapport($prefix.'/toPhoto');          // the symlink
rapport($prefix.'/toPhoto/');
rapport($prefix.'/toPhoto/.');
rapport($prefix.'/photoTMP');        // a real directory
?>
and this give :
./toPhoto NOT dir
./toPhoto NOT readable
./toPhoto NOT link
./toPhoto/ NOT dir
./toPhoto/ NOT readable
./toPhoto/ NOT link
./toPhoto/. NOT dir
./toPhoto/. NOT readable
./toPhoto/. NOT link
./photoTMP dir
./photoTMP readable
./photoTMP NOT link
Could you explain me why PHP (without any error) tell me that toPhoto is not a link nor a directory ?