Is there a way to send a large (about >700mb) file to the Browser without exceeding memory in PHP?
I tried using fpassthru and readfile and it exceedet the memory limit.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The most efficient solution would be to use the X-Sendfile header, if your webserver supports it.
It means you don’t need to occupy PHP at all with serving the file, you just send the header and let the web server handle it.
Example (from the Apache mod_xsendfile page:)