In your php folder edit the php.ini file and change the following values:
post_max_size = 50M
upload_max_filesize = 50M
Note: On windows I had to restart IIS but I am not sure if you will need to restart apache on windows or linux.
Next go into Moodle (in this case it is version 1.9.5) as admin and change the drop down menu’s for the following to your required size:
Courses -> Course Default Settings -> Maximum Upload Size
Modules -> Activities -> Assignment -> Maximum Size
---------------------------------------------------------------------------------------------------------------------
Modifying the php.ini file
These instructions show you how to change the file upload size by editing your php.ini file.
Ubuntu Linux Instructions
These instructions assume that you have installed the standard Moodle package, PHP 5 and Apache 2 via apt-get and left it all as a default install. If you have compiled yourself I presume that you will know where your php.ini files are!
You need to edit the following three settings in your php.ini file located at: /etc/php5/apache2/
- Type "sudo nano /etc/php5/apache2/php.ini"
- Press Ctrl and W and type "post_max_size"
- Change the value to the number of Mb you want your site to accept as uploads
- Press Ctrl and W and type "upload_max_filesize"
- Change the value to the number of Mb you want your site to accept as uploads
- Press Ctrl and W and type "max_execution_time"
- Change the value to 600
- Press Ctrl and O
- Press Ctrl and X
- Type sudo /etc/init.d/apache2 restart
Your new file size limit should now appear in Administration > Security > Site Policies > Maximum uploaded file size
-------------------------------------------------------------------------------------------------------------------------------
Modifying the apache config file
Ubuntu Linux Instructions
You may also need to edit the config.php file in the moodle directory:
- Type "gksudo nautilus" to get root permissions
- Navigate to /etc/moodle
- Open apache.conf
- Go to the "
" section - Change "php_value upload_max_filesize = 2M" to a higher value
- Change "php_value post_max_size = 2M" to a higher value
- Go to the "
" section - Change "php_value upload_max_filesize = 2M" to a higher value
- Change "php_value post_max_size = 2M" to a higher value
- Save file
- Type sudo /etc/init.d/apache2 restart
No comments:
Post a Comment