Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

File Upload Limit?

Go to End

5 Posts   6253 Views


Community Member, 25 Posts

8 January 2010 at 11:03pm

Hi, I am having problems solving an issue where I am unable to upload files over 2Mb from within the Files/Images in the CMS. I have read the forum and there has been mention of a php.ini file being modified. I have placed a php.ini file in the root of my server but still have this problem. Any help or advice on where to place the php.ini file or indeed what to change within that file would be greatly appreciated.



Community Member, 45 Posts

9 January 2010 at 2:48pm

Hey SuperBlues.

Your problem is indeed related to php.ini.

In php.ini there is a section related to file uploads that will have the following line in it;

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M

Change the 2M to be something more in line with what you need, then restart apache and you should be good to go.

It is also possible (though i have not tried this yet) to put the following line in to the .htaccess.

php_value upload_max_filesize 20M

Hope that helps.



Community Member, 25 Posts

11 January 2010 at 1:20am

Hi thanks for clarifying but I have made these changes and still have a 2Mb limit it seems. I clarified that the limit had been changed by viewing the info.php page and it is set to 8mb now but still unable to upload anything larger than 2Mb.

I noticed that there is no value in the upload_tmp_dir does this need to be changed? If so what to?

thanks for any help here guys!!!!


Forum Moderator, 922 Posts

11 January 2010 at 9:18am

You also need to increase the value of "post_max_size" in your php.ini file.


Community Member, 166 Posts

22 June 2017 at 12:43am

Hmm... a little weird, but maybe something has changed on the server. Up until now, haven't had the 2mb max file limit error appear when uploading large files.

In this SS3 instance, I already had the following lines in the php.ini, and it obviously didn't have any effect:

upload_max_filesize = 24M
post_max_size = 24M

I had also uploaded a php.ini with those lines above in the /framework directory, and this didn't have any effect either.

I also tried following the instructions on globally overriding the UploadField_Validator variables in config.yml with the following lines, but this also didn't have any effect:

        '[image]': '1m'
        '[doc]': '5m'
        'jpeg': 2000

In the end, the only thing that worked for me was adding the following lines to the .htaccess:

php_value post_max_size 24M
php_value upload_max_filesize 24M