Increase file_upload_size

Increase file_upload_size

by VI Webmaster -
Number of replies: 4
Thanks to everyone in this form who help with all our questions!!

My question is in regards to increasing the file upload size. When I got to upload a file it tells me that my max size is 8MB. I need to increase this size. I have looked and read though a number of forums and documents trying to explain how to do this by changing the amount in the php.ini file and creating an htaccess file but even after doing this I am having no luck changing the max files upload size. Can anyone help me with this!? Thanks so much!!

W
Average of ratings: -
In reply to VI Webmaster

Re: Increase file_upload_size

by Frank Aube -
Hi, You need to change both of the values below in your php.ini

upload_max_filesize = 20M
post_max_size = 20M
In reply to Frank Aube

Re: Increase file_upload_size

by VI Webmaster -
I have done this but it still does not change anything! Thanks for your help. I do need some more detailed instructions though!

W
In reply to VI Webmaster

Re: Increase file_upload_size

by Danny Wahl -
here's mine to give you an idea. Also, if you've added it to your htaccess you need to make sure that your vhost has allowoverride set to true for the htaccess to work.

php.ini:

memory_limit 128M
post_max_size 96M
upload_max_filesize 64M

this scales nicely- so a user uploading a 64Mb file doesn't trash your server.

Moodle:

admin->server->performance
Extra PHP memory limit 256M

admin->courses->course default settings
maximum upload size 64M

course->edit course settings
maximum upload size 64M


then an uploaded assignment should be able to access the new limit

-----

Also, check this bug I found a while back regarding increasing the mem_limit (it may be what you're experiencing):

http://tracker.moodle.org/browse/MDL-21316

basically what happens is that the course doesn't inherit the new setting (course->edit course settings->maximum upload size). It will show the new value- but it will actually still be set at the old value until you press "save". This is seen in an assignment which still sees the old value- which is read from the course.
In reply to VI Webmaster

Re: Increase file_upload_size

by Robin Sowton -

I ran into this too. After I modified the php.ini file, I had to restart the Apache server. On a Linux Centos box, you would run this as root: /sbin/service httpd restart