
06-27-2012, 11:44 AM
|
|
Member
|
|
Join Date: Apr 2012
Posts: 10
|
|
Yes, directly download big files work. But when I send file with PHP, It doesn't work.
Can you help me to find where are the problem?
My PHP and LiteSpeed are 64 bits, I don't understand why this is happening.
Please look at this script:
PHP Code:
<?php $sz = 1024 * 1024 * (1024 * 2); //$sz-=1; //die($sz); $mimetype = 'application/x-rar-compressed'; header('Content-Type: '.$mimetype ); header('Content-Disposition: attachment; filename="test.rar"'); header("Content-Length: ".($sz)); for($i=0; $i<$sz; $i++){ echo " "; } ?>
There is no file, and should display the download window and correct file size.
In Apache works fine. When I try this with LiteSpeed, download don't start and use 96 percent of CPU.
I need to run some code inside of the download loop to do some verifications when every chunk was send. (control download speed based on number of users downloading)
With the header X-LiteSpeed-Location I can't do this.
I've checked with Wireshark, when I request the page with this script, It doesn't receive response.
When I uncomment //$sz-=1; it works. (because works with files <2147483648)
Can you test this script in your LiteSpeed server and check if it works?
Last edited by franciscol99; 06-27-2012 at 11:52 AM..
|