Uploding files more than 8MB

Uploding files more than 8MB

ໂດຍ Georges Kaddoum -
ຈຳນວນການຕອບກັບ: 7

Hi all

I need to allow users to upload files that might have a size more that exeeds 8MB

I've changed the values of the "Config" table in the database (maxbytes) and in the "Assignement" table (maxbytes) , and i've cahanged also the values of "UPLAOD_MAX_SIZE" in the PHP.ini file on my webserver as well as i added the "LimitRequestBody" in the httpd.config of appache web server.

all those modifications and it still not accpeting files more that 8MB

what should i do more to fix my problem

thanks for your help

ການຈັດອັນດັບສະເລ່ຍ: -
ໃນການຕອບກັບຫາ Georges Kaddoum

Re: Uploding files more than 8MB

ໂດຍ Tony Hursh -
Georges, did you restart Apache after making the changes? If not, entering:

sudo apachectrl graceful

at the command line should do the trick.
ການຈັດອັນດັບສະເລ່ຍ: -
ໃນການຕອບກັບຫາ Tony Hursh

Re: Uploding files more than 8MB

ໂດຍ Georges Kaddoum -
Well yes i restarted it and it didn't worked
ການຈັດອັນດັບສະເລ່ຍ: -
ໃນການຕອບກັບຫາ Georges Kaddoum

Re: Uploding files more than 8MB

ໂດຍ Tony Hursh -
Georges, there are four places where this is controlled:

1) php.ini (you've fixed this)
2) httpd.conf (you've fixed this)
3) "maxbytes" in http://yoursite/admin/config.php
4) "Maximum upload size" in the settings screen for the specific course.

You shouldn't need to change anything in the database directly.

ການຈັດອັນດັບສະເລ່ຍ: -
ໃນການຕອບກັບຫາ Georges Kaddoum

Re: Uploding files more than 8MB

ໂດຍ Ramz p -

I guess there is a spelling mistake in UPLOAD_MAX_SIZE (Urs is UPLAOD_MAX_SIZE)

Check this out.

ການຈັດອັນດັບສະເລ່ຍ: -
ໃນການຕອບກັບຫາ Georges Kaddoum

Re: Uploding files more than 8MB

ໂດຍ kevin metcalf -
Just in case anyone else finds this the same way I did (google 'moodle upload 8MB'), I'm adding this post to the end of all threads that don't have all this info (I'll post them here to increase the likelihood anyone searching will find what they are looking for).

There are four things you have to do to ensure this works properly (in some versions of linux). Let's say I want to allow for a 50 MB upload (we've got a photoshop class where student files can easily exceed 8MB). Here are the steps needed to ensure your site can handle this:

1. Update /etc/php.ini (or where ever your php.ini file is) to reflect TWO changes:
* upload_max_filesize = 50M
* post_max_size = 50M
2. Update apache's config file in /etc/httpd/httpd.conf (or where ever your httpd.conf file is located):
* LimitRequestBody 51200000
3. Restart apache:
* apachectl stop
* apachectl start
4. Update the Moodle Course Variables entity. (Do this last or you won't be able to see the new size options).
(NOTE: A simple restart didn't reload the modules correctly for my system, YMMV.)

Googlers may also be intested in knowing that browsers don't always respect the upload limit and may try to upload a file that is too large. There are applets on the market (and probably free by the time you get this) which will check in advance to make sure the file is the proper size before uploading - thus saving bandwidth.
ການຈັດອັນດັບສະເລ່ຍ:Useful (1)
ໃນການຕອບກັບຫາ kevin metcalf

Re: Uploding files more than 8MB

ໂດຍ Don Hinkelman -
ຮູບພາບຂອງ Particularly helpful Moodlers ຮູບພາບຂອງ Plugin developers
Hi Kevin,

Thanks for the little help file for this common question.  You might go and add your notes to the documentation wiki as well.  You know, it is like Wikipedia--anyone can add.

Some added points to note...
  • Apache 1.3 (at least mine) does not need to be modified.  There is no line called LimitRequestBody.  Just modify php.ini.  
  • In Apache 2, you probably need to modify or add this line  LimitRequestBody 0   (the last number is a zero).  I doubt there is a need to make the limit at 51200000.  And writing zero is easier.  ຍິ້ມ
  • On hosting services, you probably won't have access to php.ini, so make a file called php.ini in a text editor and place those two lines in it.  Then put a copy of that php.ini in *every* folder in Moodle that might be concerned with file uploads (ie:  /mod/forum    /mod/assignment   ).

ການຈັດອັນດັບສະເລ່ຍ:Useful (1)