2

I have installed Moodle 3.2 on Ubuntu server 16.04. I am not able to upload files bigger than 2 MB . The error I get is:

enter code hereThe uploaded file exceeds the upload_max_filesize directive in php.ini.

I changed the entry in /etc/php/7.0/cli/php.ini to 800M. I also created an .htaccess file in Moodle directory with the following entries.

php_value upload_max_filesize 2097152000
php_value post_max_size 2097152000
php_value max_execution_time 6000

In spite of this I am not able to post any files greater than 2 MB in Moodle. Please suggest.

Zanna
  • 72,471
  • 1
    Did you restart Apache after the change? What's the output of phpinfo()? – David Foerster Mar 06 '17 at 15:51
  • While we talk about PHP and Apache2, I think, you have to change /etc/php/7.0/apache2/php.ini. 2. post_max_size must be bigger than upload_max_filesize. 3. Are you sure that .htaccess files are allowed for this virtual host - is there AllowOverride All directive for this <Directory>?
  • – pa4080 Mar 06 '17 at 16:05
  • Yes I restarted Apache, to make sure later restarted the server. – Deepak Deshpande Mar 06 '17 at 16:15
  • 1
    @Spas Spasov Thank you for your help. I changed post_max_size also to 800M and the problem is solved, – Deepak Deshpande Mar 06 '17 at 16:48