Just another Perl shrine | |
PerlMonks |
Sending files with XSendFileby rpnoble419 (Pilgrim) |
on Oct 22, 2012 at 03:32 UTC ( [id://1000255]=perlquestion: print w/replies, xml ) | Need Help?? |
rpnoble419 has asked for the wisdom of the Perl Monks concerning the following question:
Has anyone tried out the Apache module for XSendFile with Perl? I installed it and it seams to be working (Apache started). I have tried a few attempts using the following Perl code to download a file:
I'm not getting the video to download. In Chrome, I not getting the correct header, and Apache is giving me a 404 error when I run the script. I'm trying to serve large video files after the user passes muster in my app. Here is the sample PHP code I based my Perl script on.
I tried to serve the file via Perl but the file is over 1.7GB and it hangs my server with an out of memory error. Update: Sorry where are my manners. As always, Thank You for your time and help... Update with Solution: I had two things wrong. The first was my Apache Config. The config must look like this in-order to work: httpd.conf
The actual XsendFile On can be located in a vhost block as well, but the XSendFilePath must be located in the httpd.conf file. My Perl header was in the wrong order. It needs to look like this:
Now my system can stream the video after the user has been authenticated and I can create a one-time use URL.
Back to
Seekers of Perl Wisdom
|
|