Page 1 of 1

Max upload file size limitation doesn work with uploads module

Posted: Fri Nov 23, 2007 1:07 pm
by liudaz
CMS MS v1.2
PHP Version 4.4.8
Latest uploads module

Uploads module is really great. Works everything just like i wanted. There is only one issue, that i cant work out.

I am starting photo competition with big advertising compain. i expect that most of those photos uploaded will be over 5mb. If i have enough participants, finally i will end up with no free space on my server.

This is where "Maximum file size allowed" comes into play. No mater what value i put for this, or how i change config.php $config['max_upload_size'] parameter, i can upload files up to 10mb or more.

I have tried this on the fresh install of CMSMS v1.2, but the same issue again.

There might be two reasons for that: my hosting provider doesnt let cms ms work as it is suppose to, or the uploads module is not working properly.

Has anyone had such issue? Maybe somebody could try this on their sites (different hosting provider than mine) and see if they can limit the uploaded files' size?

Thank you very much for your help.

liudaz

Re: Max upload file size limitation doesn work with uploads module

Posted: Fri Nov 23, 2007 2:25 pm
by kermit
Content -> Front End File Management (Uploads) -> Preferences tab

Maximum file size allowed (Kb)

Re: Max upload file size limitation doesn work with uploads module

Posted: Fri Nov 23, 2007 2:36 pm
by liudaz
kermit wrote: Content -> Front End File Management (Uploads) -> Preferences tab

Maximum file size allowed (Kb)

Thanks. But this is the problem, that this "Maximum file size allowed (Kb)" parameter is not working and therefore i am writing in the forum :)

Re: Max upload file size limitation doesn work with uploads module

Posted: Fri Nov 23, 2007 2:45 pm
by kermit
i thought you were just changing the config.php setting... oh, well.. moot point anyway.. it appears that the file size setting in config.php isn't doing anything. i set it to 200000 (bytes); and uploads module to 200 (kb) and was able to upload 300+ kb files to file manager and uploads module.

what server environment are you running under? you may be able to set php's max upload size via a custom pho.ini or htaccess.

if your php4 is running under apache module, try adding to .htaccess

php_value upload_max_filesize 5M
php_value post_max_size 5M

Re: Max upload file size limitation doesn work with uploads module

Posted: Fri Nov 23, 2007 2:51 pm
by calguy1000
I just checked the code, and the maximum file size is being checked when handling uploads.

Re: Max upload file size limitation doesn work with uploads module

Posted: Fri Nov 23, 2007 2:54 pm
by kermit
calguy1000 wrote: I just checked the code, and the maximum file size is being checked when handling uploads.
WHICH maximum size is checked? php's? cmsms's? the module's?

neither cmsms's config.php setting OR the uploads module preferences setting (or both) restricted me from exceeding either value in either program (filemanager for cmsms; and uploads module).

MY server config: PHP 5.1.6 (CGI), Apache 1.3.37... test install of CMSMS 1.2 and Uploads Module 1.3.0 (FEU not installed).

Re: Max upload file size limitation doesn work with uploads module

Posted: Fri Nov 23, 2007 3:01 pm
by calguy1000
Uploads module ignores the one in the config.php and has it's own (I know, I know.... that's a bad thing).... but is still subject to the one in the php.ini

keep in mind the one in the uploads module is in kilobytes (1024), not bytes..... and by default it's 100,000kb or more.... try changing it to 5 and see what happens.  You should not be able to upload a file larger than 5kb.

Re: Max upload file size limitation doesn work with uploads module

Posted: Fri Nov 23, 2007 3:30 pm
by kermit
calguy1000 wrote:
keep in mind the one in the uploads module is in kilobytes (1024), not bytes..... and by default it's 100,000kb or more.... try changing it to 5 and see what happens.  You should not be able to upload a file larger than 5kb.
i basically did that with 200 (yes, i caught the difference between php using MB, cmsms config.php using bytes, and uploads module using KB..) ;)

after further testing...

i think the uploads module is treating that preference in MEGS not KB.. it would not let me upload a 1.3mb file with a setting of 1, but with a setting of 2 it would....

so for liudaz, setting uploads preferences to 5 ought to work.

did the same tests above, earlier, and now, with filemanager and config.php settings, too -- nothing i set cmsms upload max size to matters... filemanager accepted every upload up to the actual SERVER limit... tried values ranging from 1 (yes, ONE) to 1300000 bytes and files up to 2.7mb (wasn't going to bother with uploading larger files than that; all limits i tried to set were not working anyway.. server limit is like 64mb ;) )

Re: Max upload file size limitation doesn work with uploads module

Posted: Fri Nov 23, 2007 3:36 pm
by calguy1000
is this in 1.2.....  if it is, I'll check out the file manager module and fix it for 1.2.1
and yeah, I guess I'll do some testing on the uploads module.  It should listen ideally to the config.php setting.

so much to do..... I need a personal assistant..... hmmm, anybody going to school that I can use as an 'intern'. to help with all the testing, and ugly stuff?

Re: Max upload file size limitation doesn work with uploads module

Posted: Fri Nov 23, 2007 3:40 pm
by kermit
calguy1000 wrote: is this in 1.2.....  if it is, I'll check out the file manager module and fix it for 1.2.1
and yeah, I guess I'll do some testing on the uploads module.  It should listen ideally to the config.php setting.
yea, it's filemanager in 1.2 -- note imagemanager is respecting config.php setting -- just filemanager (of core stuff).

for uploads module; yes, it should honor config.php setting.. but perhaps change what setting is there to an OVERRIDE of that (lower, not higher; so only the 'real' admin can change it higher).

Re: Max upload file size limitation doesn work with uploads module

Posted: Fri Nov 23, 2007 5:58 pm
by liudaz
Thanks for your attention. I guess for me the 3 meg parameter would work. If i try to upload a larger file than it is suppose to be, i get an error mesage: "--Add Me - module:Uploads string:error_filetoolarge--". I guess there is no error handling for this type of error.

Thanks anyway and i hope this will be fixed for the cms ms 1.2.1 :)

Cheers! :)