Page 1 of 1

Filesize problems with Uploads

Posted: Thu Apr 12, 2007 9:03 am
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?

Re: Filesize problems with Uploads

Posted: Thu Apr 12, 2007 9:11 am
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.

Re: Filesize problems with Uploads

Posted: Fri Apr 13, 2007 11:41 am
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?

Re: Filesize problems with Uploads

Posted: Fri Apr 13, 2007 2:28 pm
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.

Re: Filesize problems with Uploads

Posted: Sat Apr 14, 2007 1:41 am
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.

Re: Filesize problems with Uploads

Posted: Sun Apr 15, 2007 9:38 am
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  ::) ...

Re: Filesize problems with Uploads

Posted: Sat Apr 21, 2007 2:29 am
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.

Re: Filesize problems with Uploads

Posted: Sun Apr 22, 2007 9:00 pm
by cyberman
If you own a server you can easy cancel this limits ...