I did this by adding this code to the php.ini file in cgi-bin:
upload_max_filesize = 20971520
post_max_size = 20971520
However, I just noticed when I tried to upload a large file that I still had a limit at the course level and in the site files of 4MB. How do I get the permissions to carry over to the course level?
Todd
Todd Luger
Instructional Designer
Department of e-Learning
Savannah College of Art and Design
voice: (912) 525-8033
fax: (912) 525-8035
Saludos. Iñaki.
Login to your course and choose "Settings" from the "Administration" block. It will allow you to set the Maximum upload size. for that course only.
Like Iñaki said, you need to set this for every course manually.
Bill
Todd
this is fromthe site files upload page, but its the same in every course.
Here's one from settings for a course (I can't grab the menu when it is dropped down, but trust me 4MB is the largest number in it):
Is 8MB the limit of Moodle?
--Martin
No, I have one of my sites (Moodle 1.5.4) set to 20MB at the site level and can set any course to that level and any assignment to that level. I am running a dedicated server and made the changes to php.ini on the server. Note: I did have the course set to 5MB, but changed it to 20MB for this example just to show it works.
Edit: Just a thought...I haven't followed this discussion extensively, but from what I've picked up by scanning things, it seems that if you are on a shared server and are trying to over-ride the server max file upload with local php.ini or httaccess changes, then it's my understanding that one file won't do this...you have to make those changes every where (in every directory, I assume) where you want this overridden. Not 100% sure about this....just a thought.
Steve
On my server (shared hosting) when running a PHP4 version it needs a php.ini file in all directories that include php files, if running a PHP5 version you just need the one.
See the last 3 posts or so in this thread for scripts to sort this out.
Regards
Harry
Following on from Steve's point . . . what version of PHP are you all using?
PHP 4 here...but again, I made the changes on the server, so it probably doesn't matter in my case.
Steve
I think it's more a case of the sky's the limit . . . I have a couple of sites set up for 250MB uploads.
See my post below, depending on your setup may help.
Good luck!
H
Edit: sorry, the post above!
And upstream, most people have neither the connection speed nor reliability to transfer very large files via HTTP upload over WAN. Give FTP access to the moodle data directory if you must. Having said that I've successfully uploaded videos of several hundred MB from home through moodle with no noticable problems.
Though if you're not running php as a module, check for php memory bloat with a process monitor when uploading very large files.
While we're in the screenshot competition,
It's also set at 2GB on some courses.
- managing FTP logins from a huge number of users. I've tried enabling LDAP logins with pure-ftpd but haven't had any luck... perhaps other ftp servers work better.
- The slightly confusing naming scheme in the moodledata directory. Less.. uh... technical faculty might not be comfortable with having to figure out their course ID in the system and opening up that directory.
I presume you only did this in special cases with specific users, which makes everything a whole lot simpler. I had to do it a few months back to let a professor upload some huge course files.
The tool is simple to use but has a restriction, it uses the apache ftp server, so I Don't know very much about portability problems
It creates an extra table that is used by the apache ftp server to check the users.
Then for each teacher and course creates an account with user "teacher_course"
and password ... i think the same of the teacher in moodle (well it gives to apache the md5 code of the password)
Then using IE you can drag and drop files.
In firefox only Drag and not drop
In konkeror I think that drag and drop
Or use an ftp client.
I you find it useful i think i could make a patch for this
first I edited my php.ini file and changed these three settings with a find replace.
upload_max_filesize 50M
post_max_size 50M
memory_limit 128M
I edited the moodle database.
First edit table mdl_config. Change the value for id: 50 set the valuse to: 52428800 (that is 50mb in bytes)
I did that with this sql command:
update `moodle`.`mdl_config` set value=52428800 where id=50
Second I updated all of my courses to allow 50mb files by editing the mdl_course table.
I did that with this sql command:
update `moodle`.`mdl_course` set maxbytes=52428800
Now I can upload 50mb files. I hope it works for you too.
I hope someone can set me straight. My hosting is with godaddy, when I call them for support they say they don't support moodle
After I looked again at my php.ini I noticed that my post_max_size was set for 10M so I'll up that also and that should do it
Hi Shem,
I have lately adopted moodle in my unversity and i am facign the same problem. The default maximim file size is 16M only. I tried your technique and changed the value for thwe upload_max_filesize to 50M
but now when I go to Administration - > courses -> default course settings
the maximim fiel upload size has correctly increased to 50M however I have this error in red under this field that says : "Invalid current value: 16777216"
Do you know how I can solve this problem ? and does this mean that increasing the file upload size will not work ??
Please help.
Thanks
Marwa
I would make sure you restarted your server after you made the server adjustment. I found that my admin was doing a soft restart and that didnt do the trick. Had to do a complete shut down and restart.
Good luck!
Hi Tiffany,
Thanks for your reply. But I actually did restarted the server and still this error is still there. The thing is I just edited the php.ini, do I need to do any more changes to reflect the max file size in the default course sesstings page?
Thanks,
Marwa
Yes there is a course by course file upload setting.
http://docs.moodle.org/en/Course_settings#Maximum_upload_size
beyond that you are going to have to be a bit clearer on exactly what you have done and want to accomplsh.
Thanks for correcting my error
But it makes sense to refer people back to the docs, as that way there is less chance for confusion.
While RTFM is not necessarily a friendly response, it can be the most helpful ;)
Yes, I've tried to recreate the problem. I've even deleted the course and attempted to reload. I have a large video file in the course. The course I am attempting to upload is 76Mb. I've changed the php.ini to accept up to 100Mb. I recreate the course and upload it again. Again, it seems to pause after I upload the file and attempt to re-enter the course. It would seem it has something to do with the unzipping process because thats where it seems to hang up. Also, I don't see the debugging in my browser window. I have it set to developer.
Hi there...
I want to increase the upload file size (>2 MB). Site is running on a host server. I donot have access to php.ini file and I'm unable to edit the .htaccess file.
I tried creating a new .htaccess file with the following parameters
php_value post_max_size 22M
php_value upload_max_filesize 20M
But this didn't help me, in fact the website is showing a white page with some error messages. So, i sticked on 2 my old .htaccess file.
Can anyone suggest me a way to increase the upload size.
Thanks.
I've managed to increase the upload file size to 300 Megabytes.
I need that size since my backup zip filesizes are around 58Meg to 190+ Meg.
To stop seeig the "Invalid Current Value: 16777216" below the default course size after you have changed the value or max upload size in the php.cfg file, simply go to the bottom of the page and select the SAVE button...the red error message will then clear and it will display your new Max Upload Size correctly.
Thanks Carl - this fixed my issue with the same error.
How do you increase the max upload size for Moodle?
If your using Shared Hosting, you need to edit php.in file under public_html folder.
See the steps: http://virtualizesharepoint.com/2011/05/16/maximum-file-upload-size-in-moodle/
I got this from my host:
"You can increase your upload limit by editing the php.ini file (if none exists you will have to create it within public_html). Please add the following lines of code to it:
upload_max_filesize = 100M
post_max_size = 100M
Find your .htaccess file, again if one doesn't exist simply create it and add: suPHP_ConfigPath /home/username/public_html
where username is your cPanel username
This will cause the php.ini file to affect all subfolders unless a php.ini file is in a subfolder, at which point the php.ini in the subfolder takes precedence.
For the PHP settings you do not have in your php.ini file, PHP will use our default configurations."
I did it an immediately checked and my course Maximum upload size dropdowns now allow 100MB. I did not have to do anything else besides this.
Note: The files must be in public_html, I think, because making similar changes in a php.ini file in a cgi-bin directory had no effect.
Cheers.
Todd
Thanks for this. Making changes to php.ini file alone was not enough, updating the .htaccess file did the trick for me.