Max File Size

Max File Size

by Javi Navarro Ferrando -
Number of replies: 5
Hello,

I'm new with moodle (1.7.1+).
I'm using Windows 2003 + IIS 6 + ISAPI PHP, and I've configured and create a new Moodle Course in less than an hour.

Now my problem is that I've seen that the Max File Size is only 2MB, and I can't configure more with Moodle.

I would need up to 15 or 20 Mb (there's no problem with the hosting provider because I have a dedicated server).

What should I do?

Thanks in advance
Average of ratings: -
In reply to Javi Navarro Ferrando

Re: Max File Size

by Ken Wilson -

Hi Javi

The equivalent setting in IIS is AspMaxRequestEntityAllowed. You'll need to edit your metabase.xml file as follows:

  1. Open IIS Manager. Right-click on the server name and tick Enable Direct Metabase Edit.
  2. Stop the IIS service using IIS Manager or at the prompt (net stop iisadmin).
  3. Right-click and open the file c:\windows\system32\inetsvr\metabase.xml using WordPad.
  4. Edit -> Find -> AspMaxRequestEntityAllowed. Change the default (200KB) to the value you want in *bytes*, e.g. 20Mb = 20 * 1024 * 1024 = 20971520.
  5. Save the file.
  6. Restart IIS using IIS Manager.

Hope this helps!

Ken

In reply to Ken Wilson

Re: Max File Size

by Javi Navarro Ferrando -
Hi Ken!

As it needs an IIS restart and I have other working websites using IIS, I'll try it tonight ;)

My question is: will moodle automatically see this changes and would let me to set A bigger upload size!

As far as I know (I'm a begginer) I can only select the max file size with a dropdownlist, that gives me closed options: 2MB, 1MB, 500KB, etc.

Thanks for your responses!
In reply to Javi Navarro Ferrando

Re: Max File Size

by Just H -
Hi Javi

I have no idea about IIS but on a linux box, as soon as you have changed it, the drop down changes to reflect your new settings - assume it would be the same on IIS.

Regards
Harry
In reply to Javi Navarro Ferrando

Re: Max File Size

by Ken Wilson -

Hi Javi

Looking at the code there is a function in lib/moodlelib.php called get_max_upload_sizes which will provide a list of the available file sizes depending on the value you set. While you're adjusting the max file size, remember that there are several php settings that need to be changed as well. The details are here.

Good luck!

Ken