kgp43
asked on
mod_xsendfile; empty files of 2KB each
Hi,
I have problems to use "mod_xsendfile".
It has been installed and configured on my VPS.
I use this in my "download.php" file to force downloads:
The file is downloaded correctly if I use "normal" download methods (readfile etc.).
By using mod_xsendfile I only get 2KB files.
$filepath is correct (worked with old download code, no mod_xsendfile).
This has been added to httpd.conf:
The videos/files are located in this directory:
I'm so lost, have used hours trying to find the error, no success :(
I have problems to use "mod_xsendfile".
It has been installed and configured on my VPS.
I use this in my "download.php" file to force downloads:
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.$filename);
header('X-Sendfile: '.$filepath);
The file is downloaded correctly if I use "normal" download methods (readfile etc.).
By using mod_xsendfile I only get 2KB files.
$filepath is correct (worked with old download code, no mod_xsendfile).
This has been added to httpd.conf:
# Turn it on
XSendFile on
# Whitelist a target directory.
XSendFilePath /home/s10hate
The videos/files are located in this directory:
/home/s10hate/videos/...
I'm so lost, have used hours trying to find the error, no success :(
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.