Search found 3 matches

by maxmil
Tue Oct 09, 2007 10:07 am
Forum: PHP - Code
Topic: High CPU usage when streaming a file
Replies: 6
Views: 2000

No its not a URL, its a local file. The file however can be as big as 100Mb! usleep() works perfectly to control de CPU. The problem that it incurs is that the the scipt can now exceed the maximum execution time (by default 30 seconds). It could be possible to play with the sleep time, this value an...
by maxmil
Tue Oct 09, 2007 6:51 am
Forum: PHP - Code
Topic: High CPU usage when streaming a file
Replies: 6
Views: 2000

PHP Version: 5.2.0
Apache: 2.0.59

I have tried both ob_end_clean() and readFile() but the problem remains.
by maxmil
Tue Oct 09, 2007 5:50 am
Forum: PHP - Code
Topic: High CPU usage when streaming a file
Replies: 6
Views: 2000

High CPU usage when streaming a file

Hi, I have a web application that allows users to download pdf files from the server. To control access to these files they are not in a directory that is visible from the web. When a user requests one of the files the code sets the necessary headers and writes the files bytes to the output. Using f...