23376 Posts in 18295 Topics by 2867 members
|Go to End|
21 August 2013 at 7:27am
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?
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.
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
|Go to Top|