I am having trouble with php using x-sendfile (or X-LIGHTTPD-send-file) with lighttpd on my My Book. To download a file with x-sendfile in a php script works, but the file is always 0 bytes. If I use readfile() I get the right file, but this only works for small files. If I want to serve big files I only get a couple of Mb, so this is not an option.
I have googled my as* off to find an answer but none off them work.
I've switched zlib.output off in php.ini and enabled 'allow-x-send-files' in lighttpd.conf.
My php script is:
header ("Content-Disposition: attachment; filename=test.doc");
header ("X-Sendfile: /test.doc");
I hope anyone has an solution.
Edit: I have changed X-Sendfile in BlahBlah and it still downloads the file with 0 bytes.
It looks like it doesn't recognise the X-Sendfile.
How can I check if x-sendfile is enabled, just to be sure.