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:

header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.$filename);
header('X-Sendfile: '.$filepath);

Open in new window


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

Open in new window


The videos/files are located in this directory:
/home/s10hate/videos/...

Open in new window


I'm so lost, have used hours trying to find the error, no success :(
kgp43Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kgp43Author Commented:
Problem fixed, server admins forgot to add this to httpd.conf:

# Turn it on
XSendFile on

# Whitelist a target directory.
XSendFilePath /home/s10hate

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.