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.

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

Max upload file size

Go to End

3 Posts   4041 Views


Community Member, 5 Posts

21 August 2013 at 7:27am

Hi guys,

I'm running Silverstripe 3.0.5 with no problems so far. I have just added a upload field and it says the file exceeds 2M. I researched solutions and found that you need to edit the php.ini file to ensure post_max_size and upload_max_filesize are set to = whatever you need.

These are already set in the php.ini file that's in the root folder, and their values are 50M.

Does anyone have any suggestions?



Community Member, 5 Posts

22 August 2013 at 6:44am

I put a php.ini file in the framework directory and it made the upload file work, but broke other things.

The support community sucks for Silverstripe. I never get a reply on here.


Community Member, 187 Posts

22 August 2013 at 8:17pm

Firstly do a phpinfo(); and check that your php.ini values are being applied. Also, when you create your uploadfield, try the following:

$uploadField->getValidator()->setAllowedMaxFileSize(52428800); // 50Mb in bytes