There are lots of other questions referring to x-sendfile not returning files, but none of them appear to be able to fix my issue.
I am serving images from a directory outside the public root of the site and want to be able to deliver those images to the user with as little overhead as possible, so I want to avoid processing them with readfile(). Hence I am trying to use x-sendfile.
My development environment consists of a XAMPP (apache and php) installation on a 64bit windows. I'm using the 64bit windows binary of mod_xsendfile.so, which appears to be loaded correctly according to phpinfo().
I was thinking it could be a problem around case-sensitivity or backslash/forwardslash but this doesn't seem to be the case.
The file does exist, if I copy the path out of the error log and paste it into an explorer window the image loads. Also I have used file_exists and filesize to verify the path in php.
httpd.conf setup:
LoadModule xsendfile_module modules/mod_xsendfile.so
XSendFile On
XSendFilePath "c:/images-store/"
PHP code
header('Content-Type: image/jpeg');
header('X-Sendfile: c:/image-store/5cca6ef24ae46c4346c24846ee3e5521213562ef-thumb.jpg');
Error log entry
[pid 3208:tid 1900] (20023)The given path was above the root path: [client 127.0.0.1:57477] xsendfile: unable to find file: c:/image-store/5cca6ef24ae46c4346c24846ee3e5521213562ef-thumb.jpg
Any insights as to how I can get these files to be served would be great.