Large downloads fail because of PHP's execution time limit

ziggyk - May 14, 2006 - 03:04
Project:Filemanager
Version:HEAD
Component:Miscellaneous
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

I've spent a lot of time trying to figure this out and I believe it is a problem with File Manager.

I am currently using acid free to stream embedded videos on my website which uses file manager to store the videos. When I am not on the same local network as my server (aka at my job) my videos will stream up to ~5 MB and than just stop. I press play again or anything. If the file is under 5 MB I have no problem with viewing the entire video.

This is happening on any size video at ~5 MB. I have a 6.7 MB video that always stops at 77%. The reason I believe it is filemanager is because when I upload that same video through Gallery on my website I can stream the entire file with no problems.

You must use internet explorer to open these links:
Here is the video through file manager: http://tinyurl.com/nyuu6
Here is the video through gallery: http://tinyurl.com/o77mu
(I didn't link to the embedded pages because it happens even when it isn't embedded)

Thank you for your help.

#1

ziggyk - May 30, 2006 - 16:55
Priority:normal» critical

I still can't figure out what this problem is so I am changing the priority.

#2

ziggyk - June 13, 2006 - 17:21

bump

#3

Moxide - November 5, 2006 - 17:01
Status:active» needs review

Hi !

I'm reviving this issue, because it still exists in the latest cvs (01/11/2006).

This problem is caused by an exceeded PHP execution time limit in the _filemanager_transfer function, line 1043:

while (!feof($fd)) {
  print fread($fd, 1024);
}
fclose($fd);

The proposed replacement :

while (!feof($fd)) {
  set_time_limit(0);
  print fread($fd, 1024*16);
  ob_flush();
  flush();
}

I haven't tested it thoroughly, so it needs review...

#4

drewish - November 6, 2006 - 19:37
Title:Can't Stream Video Files from Filemanager Directory Past ~5 MB» Large downloads fail because of PHP's execution time limit
Status:needs review» active

that's technically, not a patch. it seems like a good idea though.

#5

Moxide - November 6, 2006 - 22:30
Status:active» needs review

OK, here is a patch against CVS 01/11/2006.

AttachmentSize
php_timeout_fix.patch 652 bytes

#6

ziggyk - November 17, 2006 - 20:46

This fixed my problem. Thank you so much for figuring this out. I have been trying to figure it out for 6 months! You made my weekend... thanks!

#7

drewish - November 18, 2006 - 00:06
Status:needs review» fixed

great thaks, it's been comitted to HEAD and 4.7

#8

Anonymous - December 2, 2006 - 00:15
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.