For our application we need to store files above the root so they can be accessed by the streaming media software.
I successfully created a symlink from:
/var/www/vhosts/myhost.com.au/httpdocs/fileserver/videostream/
to:
/usr/local/MediaServer/content/
and PHP will happily process my raw video following that symlink to the real file above the root.
However, if I try
file_exists('/var/www/vhosts/myhost.com.au/httpdocs/fileserver/videostream/myfile.mp4')
I run into all sort of "open_basedir restriction in effect" errors.
Is there a way around this? or do I need to just assume that if my database entries are correct and say the file was processed, that it actually was.
Would trying fopen work any better or is there still the basedir restrictions?
We are on a dedicated host with root permission so we can do whatever is needed.
Thanks.
Found a workaround, but it doesn't solve the question :-)
I can actually use CURL to pull in the headers of the actual file and this lets me know whether it exists or not. Plus an additional method is to check the existence of the Streaming Media servers custom URL for that file using CURL. Problem solved, but not quite how I wanted it to be.