Fixed  download - out of memory

gib

Well-known member
I thought I'd try a upload/download test.
I can upload a largish file ok (98mb), but I get an out of memory error when I try to download the same file.
I have set the attachment limit to 100mb in the admin options and in a php.ini file on the server.
ripmix.webp

When I try to download the file, I get the following memory error.
Fatal error: Out of memory (allocated 4980736) (tried to allocate 93674624 bytes) in sitedir //library/XenForo/ViewPublic/Attachment/View.php on line 38

I'm on shared hosting, but the flash uploader seems to have worked ok.
Is there any way of downloading via another method which doesn't try and load the file into memory first ?
 
Is there any way of downloading via another method which doesn't try and load the file into memory first ?

Not to my knowledge. But you can always ask your host to increase PHP's memory_limit.

You can also try adding this to your library/config.php file:

Code:
ini_set('memory_limit', '128M');

Or try adding this to a .htaccess file on your server (only works on Apache servers):

Code:
php_value memory_limit 128M
 
Thanks for the suggestion Jake, I've already got a 200mb limit in the php.ini file, but my shared hosting is on either 64 or 128mb.

Apart from PHPBB3, I've seen other forum software have similar issues (VB4 has same prob, but I can get round it by using the Downloads II addon), so I'm not expecting any easy answers, apart from running on a dedicated server.
Weird that the flash upload works okay, it's probably doing it in chunks though.
 
Top Bottom