I had the same problem and I was able to solve it, so maybe this solution will work for you.
First of all, you need to check the Apache error logs (for me, which are in / etc / httpd / logs). This is what I found in my:
[Wed Sep 05 14:29:02 2012] [error] [client ?.?.?.?] (20023)The given path was above the root path: xsendfile: unable to find file: /path/to/file
The problem was that the file I was looking for was located above the DocumentRoot (for me, / var / www / html) as defined in httpd.conf.
My solution was to create a symlink in the DocumentRoot directory pointing to the directory containing the file I want to serve. I used the following command:
ln -s /path/to/file_dir /path/to/doc_root/file_dir
Then all I had to do was point the xSendFile PHP point to a symbolic link:
header("X-SendFile: /path/to/doc_root/file_dir/file_name.ext");
source share