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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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

SS 3.1 unable to upload file size more than 2MB


Go to End


8 Posts   2152 Views

Avatar
VPull

Community Member, 58 Posts

28 July 2015 at 11:00pm

I am unable to upload file in asset folder which has size more than 2mb.
I already updated php.ini file in my root directory as

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

but still no success.

Avatar
lerni

Community Member, 81 Posts

28 July 2015 at 11:21pm

Can you check if the settings you made take effect per phpinfo()?

Avatar
VPull

Community Member, 58 Posts

28 July 2015 at 11:30pm

Edited: 28/07/2015 11:31pm

phpinfo shows the changes

upload_max_filesize	64M	                  64M
post_max_size	        64M	                  64M

even after I did /?flush=1 and /dev/build too.

Avatar
Pyromanik

Community Member, 419 Posts

28 July 2015 at 11:56pm

Check it's not a limitation on your install either globally (set in YAML) or locally for that field (set in PHP for that instance).
https://docs.silverstripe.org/en/3.1/developer_guides/forms/field_types/uploadfield/#limit-the-maximum-file-size
http://api.silverstripe.org/3.1/class-UploadField.html

Avatar
VPull

Community Member, 58 Posts

29 July 2015 at 12:24am

Edited: 29/07/2015 12:27am

I does not found any related code in .yml file.
and it is default field in 'FILES' tab which I am using to upload PDF file

Avatar
Pyromanik

Community Member, 419 Posts

30 July 2015 at 4:00am

Then it should be install default, which IIRC is the ini value.

try from _config.php:
die(var_dump(Config::inst()->get('AssetAdmin', 'allowed_max_file_size')));

Avatar
VPull

Community Member, 58 Posts

31 July 2015 at 5:45pm

Thanks Pyromanik for your reply.
When I added above code in _config.php it's only display white screen with message 'NULL'.

Avatar
Pyromanik

Community Member, 419 Posts

31 July 2015 at 10:54pm

heh. I dunno.

Try setting that I suppose (use YML as per docs).