Welcome Guest, Not a member yet? Register   Sign In
read_file and force_download, memory limits?
#1

[eluser]Daniel H[/eluser]
Is anybody aware of any problems with memory limits using read_file or force_download?

My (summarised) code is this:

Code:
// Get the file contents
$data = read_file("./static/brief/$brief->zip_filename.zip"); // Read the file's contents
$name = "ycn-0809-$brief->url_title.zip";

// If the download failed go back to awards section
if (!force_download($name, $data))
     redirect('awards');

This works absolutely perfectly with all the zip files that are less than 8mb, however one is 8.3mb and it downloads as 4kb and Safari says 'decompression failed' once it has done so.

I added this line at the top of the download function:

Code:
ini_set("memory_limit","18M");

...yet this doesn't seem to have any effect. Any ideas?

Thanks,

Dan.


Messages In This Thread
read_file and force_download, memory limits? - by El Forum - 10-16-2008, 02:30 AM
read_file and force_download, memory limits? - by El Forum - 10-16-2008, 05:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB