Guest
18 Oct 2012 10:31

On my website all downloads from the standard download-field which have a filesize over 25 MB don't work correctly when I want to download them. The download is finished within a second and the filesize is only 1 KB. Is this Cobalt related or a problem with my hosting company? Anyone else has this problem?

Last Modified: 02 Mar 2014


clowride VIP
Total posts: 1,022
19 Oct 2012 05:07

did you try to increase your max upload size ? in php.ini


Guest
19 Oct 2012 09:26

You can try to upload some other file from your site without using Cobalt and check if ti is issue of the server or component.


Sackgesicht VIP
Total posts: 1,636
19 Oct 2012 10:10

Sven,

i just made a test with a 48MB PDF file. Works quite well here using Cobalt 7 and latest upload field.

I uploaded with a Cobalt application already around 235K documents with file sizes up to 80MB and have not experienced any problem.


Guest
21 Oct 2012 14:01

My server configuration says: upload_max_filesize 200M

That should not be the problem. I set the upload field settings to somewhat around 190 MB (199480 KB i think). I use the latest Cobalt (error exists from day 1 of using cobalt) and latest upload field.


Guest
21 Oct 2012 14:06

Okay, I fixed and replicated the error. The problem is the setting of the upload field:

Format Parameters >>> Download link open >>> Open file in browser (works, file is downloaded correctly!)

Format Parameters >>> Download link open >>> Force download windows despite file extension (no error but file is only 1 KB).

That's the problem. Unfortunately I need the setting. Hope this helps fixing it :)


Sergey
Total posts: 13,748
22 Oct 2012 06:10

Can you see content of that 1k file? There have to be an error.


Sergey
Total posts: 13,748
22 Oct 2012 06:10

The simple notice may brake everything down. Tryt o switch error reporting to none just to test.


Sackgesicht VIP
Total posts: 1,636
22 Oct 2012 06:14

Sven,

I can download files around 50 MB with the forced download setting.

:S


Guest
22 Oct 2012 11:07

I opened one failed download with an editor and it contained this:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32921601 bytes) in /www/htdocs/w00f6992/components/com_cobalt/controllers/files.php on line 227

Problem of my webserver?


Sackgesicht VIP
Total posts: 1,636
22 Oct 2012 20:43

Sven,

increase the "memory_limit" setting in your php.ini

Maybe a value of 128M or even bigger should solve the problem.


Sergey
Total posts: 13,748
22 Oct 2012 21:59

Right. Because to send the file it reads it first into memory. I'll if I can change it to send by chunks.


Guest
23 Oct 2012 11:11

Where do I find my php.ini ? May be it is a setting, that only my hoster can change?


Sackgesicht VIP
Total posts: 1,636
23 Oct 2012 17:53

Sven,

you can see the path to your php.ini In Joomla backend under SITE --> SYSTEM INFORMATION --> PHP INFORMATION

You will find all parameters listed there.

If you dont have access to this configuration file, you might try to set it directly in the affected script.

Check this advice here ...

Good luck ...


pepperstreet VIP
Total posts: 3,837
24 Oct 2012 06:47

Where do I find my php.ini ? May be it is a setting, that only my hoster can change?

Depends on your hosting provider and environment. i.e. Shared hosting and how PHP is loaded. In certain setups, it is also possible to use your .htaccess file...

[3 Ways to Increase PHP Memory Limit

]( http://www.hostucan.com/webmaster-tutorials/increase-php-memory-limit

)


Guest
24 Oct 2012 07:21

Thank you both :) I will try the several ways provided. I am using shared hosting at all-inkl.com with an expensive package. I am wondering why it has such limitations. Or does only the script have very high requirements?


Sergey
Total posts: 13,748
24 Oct 2012 07:26

I have added chunk streaming for next update. But to learn how to manage memory good anyway :)


Guest
24 Oct 2012 08:05

Changing the value in .htaccess file (after getting the approval from my hoster) works fine. Problem does not longer exist.

Line for .htaccess

php_value memory_limit 128M

But if there is time someday it would be great to implement a way that doesn't need that much resources of the webserver.

Powered by Cobalt