Filesize problems with Uploads

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
daik
Forum Members
Forum Members
Posts: 26
Joined: Mon Feb 06, 2006 3:02 am

Filesize problems with Uploads

Post by daik »

I am using the Uploads module to get tracking of downloads, plus make it easy to provide links to downloadable files. I have recently upgraded to the latest version of Uploads (1.3).
I usually upload files via ftp to avoid the hassle of file-size limits in php. I have a few files that are quite large (>9Mb) and if a user follows a link pointing to such a file they get a question about what to do (as with normal filedownloading) and then the download never starts. What happens is that (I found this by looking in the .part file created by firefox) is this
"

Fatal error:  Allowed memory size of 12582912 bytes exhausted (tried to allocate 9359360 bytes) in /serverPathRemoved/modules/Uploads/action.getfile.php on line 85

"
Is there any way I can make the uploads module let me DOWNLOAD big files?
cyberman

Re: Filesize problems with Uploads

Post by cyberman »

Size of downloadable files can be defined in php.ini, in config.php and in uploads module preferences.

But this error message
daik wrote: Fatal error:  Allowed memory size of 12582912 bytes exhausted (tried to allocate 9359360 bytes) in /serverPathRemoved/modules/Uploads/action.getfile.php on line 85

"
means that your server memory for php processes is < 12 MB.

You can try to overwrite this serverside value with a file named . htaccess in CMSms root and

Code: Select all

php_value memory_limit 16M 
inside.
daik
Forum Members
Forum Members
Posts: 26
Joined: Mon Feb 06, 2006 3:02 am

Re: Filesize problems with Uploads

Post by daik »

Is it possible to remove filesize limitations alltogether? I mean I have files that are quite big, and after tracking a download php really does not need to be involved anymore, as far as I understand. I will try to extend the memory, but it still seems to be a bit of a hack. All I really want is download tracking of the files, maybe there is a better way of doing that?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Filesize problems with Uploads

Post by calguy1000 »

There are various java applets, etc. that will help with downloading larger files.  Adding the java functionality may help in allowing clients to download larger files, but would cause extra installation complexity.  I wrote the Uploads module initially for myself so that I could keep track of who was downloading what file (but I only needed support for smaller files).  I've never really had the need or been given the priority to add any java stuff to it.

PHP has memory limits, time limits, and file upload size limits that all have to be considered when allowing file uploads and downloads (well the upload size limit is irrelevant when downloading a file, but...).  There's no easy way to solve this problem whilst using strictly PHP. 

Unfortunately, there's no fast, easy, and good solution to uploading and downloading large files.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
daik
Forum Members
Forum Members
Posts: 26
Joined: Mon Feb 06, 2006 3:02 am

Re: Filesize problems with Uploads

Post by daik »

I will try the suggestions given by sp119.
I realize there is no simple solution. Comming where i come from (application developer) I just wonder if it would not be possible to give the browser the server url to the file after the tracking is done. Say I want to download fileA.zip from domain.com I would follow a link that goes to a php script that notes the download request in the db and then it gives the browser the url www.domain.com/uplodas/category/fileA.zip and let the "normal" webserver deal with it, and not go through php. That would make the tracking script pretty much a facade to the files, and from what I understand remove the size limitations altogether.
cyberman

Re: Filesize problems with Uploads

Post by cyberman »

daik wrote: I realize there is no simple solution. Comming where i come from (application developer) I just wonder if it would not be possible to give the browser the server url to the file after the tracking is done.
Think this is a question of server security  ::) ...
daik
Forum Members
Forum Members
Posts: 26
Joined: Mon Feb 06, 2006 3:02 am

Re: Filesize problems with Uploads

Post by daik »

Am I correct to assume that there is no plans to fix this in the near future? (this is fine, if I am the only one having this problem I suppose I am the one who should look for an alternative solution). I suppose I have to give up tracking altogether and just provide direct links to the files on the pages. More work fo rme, but I suppose it is the only way.
cyberman

Re: Filesize problems with Uploads

Post by cyberman »

If you own a server you can easy cancel this limits ...
Post Reply

Return to “Modules/Add-Ons”