Maximum upload size

Maximum upload size

by Lynne McCulloch -
Number of replies: 26

We're running Moodle 1.8.2 and had the maximum upload size set to 16MB.  However I needed to upload a 67MB file, so we changed the maximum upload on the site policy settings to 70MB and also the php on the server

However, although the maximum upload at site level is now 70MB, it still remains at 16MB at course level.  Is there something simple that I am missing?

Any suggestions would be greatly appreciated.  Many thanks.

Lynne

Average of ratings: -
In reply to Lynne McCulloch

Re: Maximum upload size

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Edit the course settings, and raise it to 70 MB. Each course has its own max upload size (that can be lower than the site max).

Saludos. Iñaki.

In reply to Iñaki Arenaza

Re: Maximum upload size

by Lynne McCulloch -

Thanks Iñaki.  However, I've already tried doing that, but the maximum upload size that I am offered at course level is still only 16MB.  I can't understand why it doesn't recognise the increase at course level.  I must be missing something here..........  mixed

Lynne

Attachment screen_dump_-_max_upload_size_at_course_level.JPG
In reply to Lynne McCulloch

Re: Maximum upload size

by Ray Lawrence -
What is the maximum upload size for the server? If it is 16Mb then any value entered in Moodle will not be effective.
In reply to Ray Lawrence

Re: Maximum upload size

by Lynne McCulloch -

php settings in Apache are set to 80-100MB, yet still the maximum at course level shows as only 16MB.  Any ideas where to go from here, please?

Lynne

In reply to Lynne McCulloch

Re: Maximum upload size

by Ray Lawrence -
What happens if you enter "0"? The site should adopt the server max.

Have you tried 73400320 rather than 70Mb?
In reply to Ray Lawrence

Re: Maximum upload size

by Lynne McCulloch -
Thanks for the suggestions, Ray.  I've just tried both of those, but with exactly the same result as before - still a maximum of 16MB at course level.
In reply to Lynne McCulloch

Re: Maximum upload size

by Mark Duffy -
Add the following file to your moodle root directory

php_value upload_max_filesize 70M
php_value post_max_size 70M

save as .htaccess

no file name. Just .htaccess.
In reply to Mark Duffy

Re: Maximum upload size

by Jeff Wood -
I have tried the above suggestions but get:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@site.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.



Apache/1.3.39 Server at site.org Port 80

Any ideas?

Jeff

In reply to Jeff Wood

Re: Maximum upload size

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You should get a more detailed error message in the Apache error logs.

Saludos. Iñaki.

In reply to Iñaki Arenaza

Re: Maximum upload size

by Jeff Wood -
Here is what the error log shows:

[Sat Oct 13 16:10:52 2007] [alert] [client ] /home/site/public_html/.htaccess: Invalid command 'php_value', perhaps mis-spelled or defined by a module not included in the server configuration
In reply to Jeff Wood

Re: Maximum upload size

by Jeff Wood -
FIXED

I have managed to correct the issue by creating a file called php.ini and making the changes in it.

Tnx for the help.

Jeff
In reply to Mark Duffy

Re: Maximum upload size

by Jeff Wood -
I have managed to change the upload limit to 50M and set this site wide; however, it doesn't seem to be working.

At the course level I can change the upload limit to 50 M via Administration > Settings, but when I go to upload a file I'm restricted to 2M. This is also the cas for site files.

Have I missed something?

running moodle 1.8.3

Jeff
In reply to Jeff Wood

Re: Maximum upload size

by Brian Pool -

What version of Linux, Apache, PHP are you using?  I use Ubuntu 7.04, PHP5, Apache2 and here is what I needed to set.

in /etc/php5/apache2/php.ini you go to line 440 and edit the line that says

post_max_size = 8M and change it to your 70M

next, go to line 545 (same file) and change

upload_max_filesize = 2M to the same number.

After that you set the limit in Moodle (security->site policies), but there you actually give the bytes (ie 70M = 73400320)

LimitRequestBody = 0 by default in apache 2 (no limit) so you don't need to set that.

If your versions are different than mine the line numbers may be slightly different but the line should be the same. 

Hope that helps!

Brian

In reply to Brian Pool

Re: Maximum upload size

by Jeff Wood -
Hi Brian,

I'm on a shared server and here are the details.

Apache - 1.3.39 (Unix)
PHP 5.2.4
mySQL 4.1.22-standard

In my /etc/ folder I only have
passwd
quota
shadow

I have copied a php.ini file from a different site I have and this helped me see the new limit in course settings but they do not show on file upload screens.

post_max_size = 52428800
upload_max_filesize = 52428800

I was told by the hosting company to create a .htaccess file and add what you suggested, but this created a 500 server error.

Jeff
In reply to Jeff Wood

Re: Maximum upload size

by Brian Pool -

Can't help you Jeff.  I have no idea on a server that you don't have primary access on.  I have heard only problems from other Tech guys that have gone that way.  I would suggest you make you own!  If you need a start...use my manual.  It is geared for Linux newbies (which I am only a few steps ahead of) and first time Moodle installers.

Depending on the size of your site, almost any PC can get you started.  I started ours on a P3-733 with 256Mb of RAM.  My manual is on our site here.  The course that holds all the materials in links is here.  It is currently in topic 1, Moodle from the Ground Up.

In reply to Brian Pool

Re: Maximum upload size

by Jeff Wood -
Thanks for the excellent resources Brian.

I think this will be something that we will have to look at shortly as space on the shared account is starting to fill up.

I'll have to talk it over with our Board IT folk and see if they will let me run it from inside the board.

Jeff

PS - Our Board is "Gunning" for a on-line delivery component and I fear that moodle isn't on their radar. I invited myself to one of the planning meetings last year to plug moodle but it seems they are heading toward D2L.

Ah but that is an entirely different story.sad
In reply to Jeff Wood

Re: Maximum upload size

by Brian Pool -

I started us out on a PIII intranet system, and eventually other teachers joined Moodle.  We then went internet and eventually upgraded to a new server.  This year we are 100% Moodle for all classes.  Teachers are only required to use it as a gradebook, but it catches on as they go.

It is obviously designed for a non-K12 environment, but I have been customizing Moodle alot for us.  Students see grades on the MyMoodle page, teachers have interim reports from the gradebook, and administrators print out a weekly D/F list for all classes for early intervention.

Make sure you explaing the 0 cost of Moodle, that sold my board over ProgressBook, which everyone else in our county uses.

Good luck!

Brian

In reply to Brian Pool

Re: Maximum upload size

by Jeff Wood -
I started years ago with FrontPage but came across moodle about 4-5 years ago and set it up as an extension of my classes. Not long before 80% of the science department has a page for their course (daily homework, interesting links, handouts, even some using the assignment feature) and the school uses it for daily announcements, calendaring information for parents.

I tell people every chance I get about moodle and the cost (lack of). I'm actually doing an presentation at a computer conference here in Ontario (Canada) on moodle next month.

Our distance ed department (Loyola) is now using moodle for some of their courses.

We have some people in decision making roles (not me - just a classroom teacher) that don't really have a clear understanding of what we teachers/students need . Also, I'm not sure their plans are reasonable. (IMHO)

WOW.. little off topic shy

Tnx for all your support.

Jeff
In reply to Jeff Wood

Re: Maximum upload size

by Jeff Wood -
Problem solved - finally surprise

I'm on a shared server and I had to copy my php.ini to different folders

moodle/
/mod
/course
/admin
/mod/data

And now - it worksbig grin
In reply to Jeff Wood

Re: Maximum upload size

by Stephen Lowe -
After a long hard road on this one you finally solved it for me big grin thanks Jeff.
In reply to Stephen Lowe

Re: Maximum upload size

by Jeff Wood -
Stephen,

I'm glad it worked for you... It was a tough go for me too.

Jeff
In reply to Jeff Wood

Re: Maximum upload size

by Stephen Lowe -
Er... nope... I can now set the 10MB in the course options, and I've updated manually in the database to cover those courses we created before the change... but something somewhere is still holding me back to 2MB. I'm on a shared host. What do you think I could have missed?
In reply to Stephen Lowe

Re: Maximum upload size

by Jeff Wood -
Stephen,

Not sure... Did you copy the php.ini file into all the directories mentioned?

The only thing I might suggest is to copy the php.ini file into ALL your moodle directories. It isn't pretty (and I'm not sure how safe) but it might work.

Hopefully someone more knowledgeable than I will help.

Jeff
In reply to Stephen Lowe

Re: Maximum upload size

by Just H -
Hi Stephen

Guessing you're running a version of PHP4?

If so, I was led to believe by a past host that a custom php.ini file had to be in every directory that held php files (no idea why?). Anyway, I used scripts 1, 2 and 3 under "Using PHP" on this site. Never had a problem for close to two years (only used script 3 once; when the server upgraded to PHP5 as then you only need one custom php.ini file).

Even if you are on PHP5 might be worth trying, script 3 cleans them all out anyway.

Good luck.

H
In reply to Just H

Re: Maximum upload size

by anurag singh -

hii,

i am using the windows version of moodle. my current requirement is to that i have collection of videos in my hard disk whch are approximately 100MB to 200MB.  i want to give the user option to view these videos. i tried searching for php.ini file.

there are two such file php.ini-PRODUCTION

php.ini-dDEVLOPMENT

i changed 

post_max_size = 2000M
upload_max_filesize = 2000M 

in both the files

also i  edited  Moodle security configuration (security->site policies), give the bytes (ie 200M = 200000000) 

still i cannot upload the videos?????

is there any other option to do this by making a video server or somthing like this??

plz help...