file upload limit 2M increase size php.ini moodle 1.9

file upload limit 2M increase size php.ini moodle 1.9

by Charles Brown -
Number of replies: 2
4/2/2008 : How I changed the default upload limit of 2M to 128M in moodle 1.9

After much trial and error and pouring through lots of feedback on the moodle help site, I finally found the right php.ini file to change in order to get the moodle 1.9 upload page to increase the 2M ( 2 megabytes) default limit for the upload file size.
My Configuration: moodle 1.9 ; WampServer 2.0b; Windows XP SP2
The correct php.ini file is located in your web server directories not your php directories - my web server is apache 2.2.8 from the latest WampServer distribution - http://www.wampserver.com/en/
My web server php.ini file is c:\wamp\bin\apache\apache2.2.8\bin\php.ini and I made the following changes
; Resource Limits;
; cb edits - 4/2/2008 : increase these 2 limits to 600 secs so that large uploads do not timeout
max_execution_time = 600 ; Maximum execution time of each script, in seconds
max_input_time = 600 ; Maximum amount of time each script may spend parsing request data
;max_input_nesting_level = 64 ; Maximum input variable nesting level
; cb edits - 4/2/2008 : I increased this limit, not sure if it was necessary
memory_limit = 256M ; Maximum amount of memory a script may consume (128MB)
; Maximum size of POST data that PHP will accept.
; cb edits - 4/2/2008 : increase this value to the desired amount
post_max_size = 128M
; Maximum allowed size for uploaded files.
; cb edits - 4/2/2008 : increase this value to the desired amount
upload_max_filesize = 128M


After saving these edits, I restarted my web server ( apache ) & database ( mysql ) and was pleased to see that my moodle 1.9 upload screen was set to a 128M file size.
After restart of servers, these other Site Administration changes may be required to enable the maximum 128M limit set in the php.ini file above.
(1) Site Administration > Courses > Add/Edit courses > select Course category & edit each course > Maximum upload size [128M]
(2) Site Administration > Security > Site Policies > Maximum uploaded file size [Server Limit]
It is possible I forgot some other little change that I made over the past week but I think the above is complete.
Good luck ... Charles cb
Average of ratings: Useful (1)