Hi:
I'm trying to store images in a non-html folder so they cannot be easily stolen.
I've done this on another server without a problem but cannot get it to work on a new server. (Both Linux).
What I do is check for the existence of the image file then serve it using fopen in the image src tag if it exists.
Here's the snippet:
$picpath="/home/admin/thumbs/";
$picfile = $picpath . "picture.jpg";
clearstatcache();
if (file_exists($picfile)) {
//display the picture (I just call a function...)
Here's what I get:
Warning: stat failed for /home/admin/thumbs/picture.jpg (errno=13 - Permission denied)
I have tried everything I can think of to ensure I have permissions...
on this box, apache runs as "apache"
I tried several variations on the path
changed ownership of thumbs directory to "apache"
changed permissions to 777
No matter what I do - file_exists fails...
Any ideas?
Thanks,
Brian