readfile() problem

From: Date: Thu, 12 Oct 2006 16:43:51 +0000
Subject: readfile() problem
Groups: php.general 
Request: Send a blank email to php-general+get-243030@lists.php.net to get a copy of this message
Hi gang, I have a problem. I am using readfile() to send files to the browser. The code is below. I had is working on another server before, but now my client have moved to a new server and we have started to experience problems with bigger files. I have three different files that I am sending. They are 3MB, 15MB and 59MB large. The 3MB and 15MB are working fine, but the 59MB does not work. I have checked so that the file_exist() and also was able to retrieve filesize() of the file, so the file is there. I have also tried to download it with the url I know it is located at, and that works too. Is there any limitations or settings of how large the files can be when using readfile()? If so, are they settable? header("Pragma: public"); header("Expires: 0"); // set expiration time header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=$Row[filename]"); header("Content-Transfer-Encoding: binary"); $filesize = filesize($filelocation); header("Content-Length: $filesize"); readfile($filelocation); Best regards, Peter Lauri www.lauri.se - personal website www.dwsasia.com - company website

« previous php.general (#243030) next »