I've got a bloody headache. I've spent all day trying to figure out my php5.ini to allow large uploads, now when I click on the download button I get an error:
File not found
Firefox can't find the file at http://dnbcentral.com/mod/file/download.php?file_guid=33
And when I go to play the mp3 file I get the error: file not found.
Any ideas. Argh. I've checked my data file and its all there.
Oh yeah, site is at http://dnbcentral.com
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Cash@costelloc
Cash - 0 likes
- Mick@michael1224
Mick - 0 likes
- Mick@michael1224
Mick - 0 likes
- Cash@costelloc
Cash - 0 likes
- Mick@michael1224
Mick - 0 likes
- Cash@costelloc
Cash - 0 likes
You must log in to post replies.Using the live http headers plugin for Firefox, it shows a 500 server error when trying to download a file. It looks like it is also trying to send the file gzip compressed. I'd look at your apache configuration first.
What am I looking for in my apache config? How do I rectify it?
OK. My error log says :
PHP Fatal error: Out of memory (allocated 99876864) (tried to allocate 8193 bytes) in /home/sites/dnbcentral.com/public_html/mod/file/download.php on line 37
The problem seems to be:
$splitString = str_split($contents, 8192);
this makes sense now - this is due to this bug: http://trac.elgg.org/ticket/1932
Rather than splitting the string, you could echo the whole thing which will save a little memory. Though you are probably running into the problem that you cannot fit the file in memory. This code reads the entire file into memory before sending it to the user. That doesn't work so well on large files and needs to change.
Is there any solution to this?
Yes, the download code should read a chunk at a time before sending to the browser so that the entire file is not read into memory.