Page 1 of 1
max_upload_size ignored when uploading from tinyMCE
Posted: Tue Sep 04, 2007 2:06 am
by mikemcvey
Hi,
I have set my max_upload_size in config.php to be 2MB...
I have clients uploading files using tinyMCE.. any idea on why they have been able to upload pdf's which are 7MB!
Searched the code base but at a bit of a loss.. any help much appreciated.
Mike
Re: max_upload_size ignored when uploading from tinyMCE
Posted: Sat Sep 08, 2007 10:04 pm
by tgmayfield
The directive is upload_max_filesize.
--Thomas
Re: max_upload_size ignored when uploading from tinyMCE
Posted: Sun Sep 09, 2007 9:51 am
by mikemcvey
So is this an error with cms 1.1.1?
as the config file states:
$config['max_upload_size'];
I just searched the whole code base and only found "upload_max_filesize" in the following files..
CMSInstallerPage1.class.php
CMSInstallerPage5.class.php
And looks likt the file is set through an ini file...
CAn I change this to disable uploads over 2MB? will the config.php vaue be ignored?
Re: max_upload_size ignored when uploading from tinyMCE
Posted: Sun Sep 09, 2007 5:07 pm
by tgmayfield
Ack. Mea culpa. Misunderstood your problem. upload_max_filesize is the PHP directive, not the CMSMS directive. The CMSMS directive is only used, however, in the hidden element on the admin/imagefiles.php and admin/files.php. From what I can see (and I'll be talking to the TinyMCE maintainer about this), it's not used in any of the TinyMCE configuration.
What you can do, if you're running on an apache server, is create a .htaccess file (or modify one if it's already there) in your site root with the content:
That will take precedence over any other value specified elsewhere.
Re: max_upload_size ignored when uploading from tinyMCE
Posted: Sun Sep 09, 2007 7:53 pm
by mikemcvey
sweet...
makes sense to me.. already got an .htaccess file so will do that.
Thank you so much for your help!
Mike