General help

 
 
Todd_recent
maximum file upload size
 
A month ago I was able to finally change the settings in my administrative permissions to allow file uploads as large as 20MB.

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



 
Average of ratings: -
Picture of Iñaki Arenaza
Re: maximum file upload size
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers
You need to change it manually in every course.

Saludos. Iñaki.
 
Average of ratings: -
Picture of Bill White
Re: maximum file upload size
 
Todd,

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
 
Average of ratings: -
Todd_recent
Re: maximum file upload size
 
I have tried this already. While the maxbytes setting in admin is set to 20MB, the dropdown menus in the individual courses only go up to 4MB.


Todd
 
Average of ratings: -
Todd_recent
Re: maximum file upload size
 
I added some screenshots to show what I mean:

screenshot of max bytes panel in admin

this is fromthe site files upload page, but its the same in every course.


screenshot of site files upload page

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):

screenshot of course settings page
 
Average of ratings: -
Picture of M Y
Re: maximum file upload size
 
Same here. My php.ini file has the upload limit set to 80mb. But site wide I cant set it any higher than 8MB.

Is 8MB the limit of Moodle?

--Martin
 
Average of ratings: -
Not a PHM :-)
Re: maximum file upload size
 

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.

File size

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

 
Average of ratings: -
Picture of Just H
Re: maximum file upload size
 
Following on from Steve's point . . . what version of PHP are you all using?

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
 
Average of ratings: -
Not a PHM :-)
Re: maximum file upload size
 

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

 
Average of ratings: -
Picture of Just H
Re: maximum file upload size
 
Hi Martin

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!
 
Average of ratings: -
Picture of Rory Allford
Re: maximum file upload size
 
Regarding that thread, LimitRequestBody 0 could theoretically be a hole for a DoS attack in future. In practice, Apache 2+ has an upper limit of 2GB anyway (or precisely 2147483647 bytes), and then the HTTP protocol limits request sizes (unless someone implements split transfer multipart / byteserving for upload!) though I would think that you are more likely to hit a connection limit or simply a transmission error due to inevitable transfer corruption first.

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,
500MB Upload Limit

It's also set at 2GB on some courses. smile

 
Average of ratings: -
Picture of Kenny Backus
Re: maximum file upload size
 
Have you set up a way for faculty or other users to easily upload via FTP or perhaps Samba? I would figure that the biggest problems with that are:
  • 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.
Furthermore, on more secure systems you would want to restrict FTP sessions so that users can only modify files for their own courses. Figuring out which course ID belongs to whom would probably require some custom scripting.

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.
 
Average of ratings: -
Picture of Joan Codina Filba
Re: maximum file upload size
 
Some of my students developed such an utility to work with ftp.
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
 
Average of ratings: -
Picture of shem pamplin
Re: maximum file upload size
 
here is how I was able to resolve the same problem.

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.
 
Average of ratings: -
Picture of Bob Johnson
Re: maximum file upload size
 
I am trying to change the max file upload size also. Forgive my question but when people say I editied my php.ini file I don't know how to do that. When I use ftp to look at the files on my host server and I don't know where to find it. Apparently it is in the cgi bin but I can;t find that either.

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
 
Average of ratings: -
Picture of Marc Grober
Re: maximum file upload size
Group Particularly helpful Moodlers
Google "moodle godaddy php.ini" and I think you will find what you are looking for....
 
Average of ratings: -
Picture of Bob Johnson
Re: maximum file upload size
 
After looking at the help files on godaddy, I found a post that talked about the php.ini as part of php and not specific to moodle. Then I called back to godaddy support and I think I got a more knowledgeable support person. He told me that I did not have a php.ini file (now I know why I could not find it) and I could just create one with a text editor and I uploaded it with ftp to the root directory of my hosted site. I set it for 20M but then when I was in my moodle course it was a 10M limit, something is still limiting it but it is better than a 2M limit

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
 
Average of ratings: -
Picture of Marwa Mahmoud
Re: maximum file upload size
 

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

 
Average of ratings: -
Picture of Tiffany Morgan
Re: maximum file upload size
 
Hi 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!
 
Average of ratings: -
Picture of Marwa Mahmoud
Re: maximum file upload size
 

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

 
Average of ratings: -
Picture of Marc Grober
Re: maximum file upload size
Group Particularly helpful Moodlers
Just to be clear-you DO NOT have to reboot a server to change php.ini values. Changes in php.ini require that the conf be reread which, when php is not running as cgi is addressed by restarting the web daemon

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.
 
Average of ratings: -
Picture of Tiffany Morgan
Re: maximum file upload size
 
My apologies--I meant restarting Apache. I had received some guidance on making adjustments to php.ini to correct a backup problems with similar error messages appearing (http://moodle.org/mod/forum/discuss.php?d=140438#p615352) and restarting Apache corrected the issue.
Thanks for correcting my error smile
 
Average of ratings: -
Picture of Marc Grober
Re: maximum file upload size
Group Particularly helpful Moodlers
No worries. The word "server" causes lots of grief in English, let alone what havoc may be wrought in translation...

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 ;)
 
Average of ratings: -
Picture of George Dickens
Re: maximum file upload size
 
I've read just about every post on this subject, and it seems to be the same story, edit the php.ini file, reboot your "server" and everything should be fine.  I've done this on my site and it does change the file upload size.  I've even manually updated the database.  However, on the Course settings page, I still show the "Invalid current value: 16777216" fault.  I can upload large files, however, when I click the button to save and return to course, it goes to the modedit.php and my site goes blank.  I get nothing.  I get logged out and my course goes kaput.  Any help would be greatly appreciated.
 
Average of ratings: -
Bartosz Cisek
Odp: Re: maximum file upload size
 
Do you have any logs from apache? Turn on debugging and post results.
 
Average of ratings: -
Picture of George Dickens
Re: Odp: Re: maximum file upload size
 
I've turned on debugging.  Now how do I get the logs?  Sorry, I'm new to the whole developer process
 
Average of ratings: -
Bartosz Cisek
Odp: Re: Odp: Re: maximum file upload size
 
After turning debugging on you should be able to see error messages in browser window. Try to reproduce your problem, maybe something will show up.
 
Average of ratings: -
Picture of George Dickens
Re: Odp: Re: Odp: Re: maximum file upload size
 

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.

 
Average of ratings: -
Picture of George Dickens
Re: maximum file upload size
 
I've still got the "Invalid current value: 16777216" in the default course size.  I've increased the size of maximum upload to 100 Mb in the php.ini file.  I've manually changed the maxbytes in the site database and in each course.  I've restarted the server (both the apache program and the actual physical machine).  I've turned on debugging, set to developer.  However, when I go through the new course set up process, I get to the point where I've uploaded my files and set up my scorm.  When I click the button to "Save and return to course"  I get directed to the modedit.php page which comes up blank (I don't even get a debugging window).  I then have to log back into the frontpage, as if I've been completely logged out.  Any help to resolve this issue would be greatly appreciated.  OBTW, I'm uploading a 76 Mb file (well within the new maximum upload size) and videos within my course presentation and I'm using moodle 1.9.9.  Thanks!
 
Average of ratings: -
Picture of George Dickens
Re: maximum file upload size
 
I've still got the "Invalid current value: 16777216" in the default course size.  I've increased the size of maximum upload to 100 Mb in the php.ini file.  I've manually changed the maxbytes in the site database and in each course.  I've restarted the server (both the apache program and the actual physical machine).  I've turned on debugging, set to developer.  However, when I go through the new course set up process, I get to the point where I've uploaded my files and set up my scorm.  When I click the button to "Save and return to course"  I get directed to the modedit.php page which comes up blank (I don't even get a debugging window).  I then have to log back into the frontpage, as if I've been completely logged out.  Any help to resolve this issue would be greatly appreciated.  OBTW, I'm uploading a 76 Mb file (well within the new maximum upload size) and videos within my course presentation and I'm using moodle 1.9.9.  Thanks!
 
Average of ratings: -
Picture of SJ K
Re: maximum file upload size
 

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.

 
Average of ratings: -
Frankie's the name, Moodle's my game!
Re: maximum file upload size
Group Particularly helpful Moodlers

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.

 
Average of ratings: -
Picture of Carl Ervin
Re: maximum file upload size
 

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.

 
Average of ratings: -
Picture of Aryan Nava
Re: maximum file upload size
 

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/


 
Average of ratings: -
Todd_recent
Re: maximum file upload size
 

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

 
Average of ratings: -
Picture of Kiran Bandari
Re: maximum file upload size
 

Thanks for this. Making changes to php.ini file alone was not enough, updating the .htaccess file did the trick for me.

 
Average of ratings: -