Increase of File Sizes

Increase of File Sizes

by Aaron Bolinger -
Number of replies: 17
I suppose this is a two-part request. First, there should be a tool in the Site Administration panel somewhere easy to find whereby you can make a change to a radio button of sorts, and plug in the file size your site needs. A 2MB limit is insufferable. I know it's probably a PhP thing, but it's not always easy to find/access the .INI files directly, and quite frankly the average Moodle administrator/user probably ought not be that deep into server files in the first place (dangerous business in there...). Modern advances -- like Harvard, Gutenberg, etc. -- have massive tomes of material available. I want some of those antiquarian texts to be resident on OUR server (to protect/mirror their availability for our students). We even author our own 500 page textbooks. It should be one-click simple to upload a 500 page PDF into the course, that could reach easily 250 mb in file size. Add to that other modern wizardry -- like our instructors doing .MP3 audio lectures, or .MP4 or .AVI video files, and you can see why a 2MB upload limit is just stupid right out of the box. Make a plug-in/tool of some sorts where I can say I want 250 MB files (or whatever) to be uploaded into courses (such as PDF textbooks, etc.) that will reside ON OUR OWN SERVER. It's not that complicated. But Moodle NEEDS that feature. You programmers ought to be able to create the interface that will go search for the file, write the entry where it needs to be in what ever language is back there (.txt file or whatever) and make it more USER FRIENDLY. The net result of this oversight is jumping through tremendous quantities of hoops on a regular basis. Ok, we link to a file someplace else (via a URL or whatever, so as to bypass this limitation). Then that file is moved (by a host we can't control somewhere else) and students find a "broken link." That's a bad reflection on the school! PLEASE find a simple administrative tool whereby we can correct this without having to hire a $200 per hour technician to dig into files sitting in a Windows Server 2012(r2) hiding spot within some combination of databases, PhP's or where-ever in the bloody'el they are. It's just a pure nuisance. Thanks! (Request 2: In the meanwhile, can you tell me exactly, step by step, how this is currently fixed? I have one of these expensive people available, but he has no idea how WordPress or Moodle needs this corrective collection of code patched into the appropriate files. Yes -- WordPress has the same problem, and I am going to hit up their tech guru's for such a plug-in/hotfix as well. PLEASE HELP! We had a major server crash, a new semester is coming, and I have mass quantities of files to upload that are seriously above these minimalistic maximums.) Thanks again!!! Aaron
Average of ratings: -
In reply to Aaron Bolinger

Re: Increase of File Sizes

by Matt Bury -
Picture of Plugin developers

Hi Aaron,

It would be convenient to control/edit php.ini settings from within Moodle but it's also be a security issue to give any web app that kind of control.

Are server settings and out of the domain and control of what web apps can and can't do. If you can convince your web hosting service providers to allow users to put php.ini "snippet" files in public directories and limit them to only adjust 'post_max_size' and 'upload_max_filesize' and a few other settings (some web hosts do) then this will resolve your issue.

I hope this helps smile

In reply to Aaron Bolinger

Re: Increase of File Sizes

by Derek Chirnside -

I think Matt has answered the question here: there is a balance between security and convenience.  There are actually three top level roles: Server, Admin and others.  You are talking I suspect about the Server level role.  Usually these issues are sorted at installation.  The process is very clear in the docs - if it is not, they are a wiki and we fix them.

If your $200 per hour consultant cannot fix this upload limit in seven minutes and 14 seconds (working slow) then get another consultant.  Also if they tell you they need to do "Quantities of hoops on a regular basis" then they are playing you.  Just an opinion.

In among a number of your rather angst ridden assertions there are some valid questions.  It sometimes makes it easier to read if you use a few paragraph breaks and maybe some bullet points.

As to request 2, have you checked the help documents on Moodle.org? They are pretty good in this area.  We can give more detail if you like.

Good luck Aaron.

-Derek

In reply to Derek Chirnside

Re: Increase of File Sizes

by Matt Bury -
Picture of Plugin developers

Another point is that if you intend to handle large numbers of downloads or large files, doing it via Moodle's file management system is probably not the most efficient option and you'll end up paying over the odds for server memory and CPU power. Moodle's file management system serves files via a PHP proxy script, something that PHP isn't really meant to do and isn't very good at. It's OK for small files like images, docs, PDFs, small MP3s, etc., but large PDFs (250MB!), video, and long audio files would be better served from a content distribution network (CDN) or even a simple bucket server which are designed to handle this kind of heavy traffic.

In short, having php.ini 'post_max_size' and 'upload_max_filesize' set somewhere below 40MB is a good idea and prevents users from slowing down your Moodle server unnecessarily.

And as Derek has pointed out, whoever is providing your web hosting services doesn't sound particularly competent from what you've described. I recommend giving them a chance to "get things right" (at their own expense, not yours) and if they don't, find another provider. Moodle's a popular web app for hosting providers to offer so there's lots of competition and some very good hosts available. smile

In reply to Derek Chirnside

Re: Increase of File Sizes

by Aaron Bolinger -
Thank you both (Matt/Derek) for replying so quickly. And Derek, I did put some paragraph breaks in my original post, but for whatever reason they didn't show up in the posted version. My apologies. (Not seeing any word processing tool bar here to use bullets, indents, etc. either. So I guess I go straight and hope for the best, and use the * character for breaks if they don't show for whatever reason. * One big problem is that our system is NOT on some host or external provider. So it's all me/us trying to figure it out, with the newest (Windows Server 2012(r2) hassles to boot. The $200 an hour tech is worth that much, and charges most people somewhere in that range. For us he is doing some pro-bono help, and that is a HUGE advantage. Yet you'll see (if you haven't already) that what WE are doing is not what most are doing. Most hosts are running some Linux configuration (LAMP) and deal with these issues daily. * This is a WIMP, and what Microsoft has done with the GUI on this version of server is just asinine. Nevertheless, it is what I have to work with. My tech has a totally different area of specialization, so we do the "hoops" trying to find workarounds. For example, if I can't get to all the files needed, I do something impressive like jump into IIS, build an FTP site, upload documents there, then build links back into Moodle/WordPress so they are all still a click away for the end user (the most important person in the mix anyway). It's a little like going from Maine to Florida by way of Oregon, but it gets the job done. * That scenario makes it miserable for other instructors uploading things to their courses. They have to back out, go into their FTP program, upload things there, then go back to Moodle with a URL, etc. * I'm just suggesting a plug-in that perhaps could be built to make the process a bit less cumbersome for someone like myself who lacks any certifications in technology, but is struggling through in a valiant attempt to keep up with it all. Each new version of everything changes the road maps, even though 98% of the technology is still the same. Now they call them "libraries." What's wrong with using a well-understood term like "folder?" The libraries are still in folders. ROFL! * Most of the documentation in these CMS programs make the presumption we're installing on Linux. That's a valid presumption, since most big hosting firms do it that way. But there should be some addendum somewhere that translates Linux-speak into Windows-speak, for those of us on the outside looking in. Just a suggestion/thought. * Matt suggested "convince your web hosting service providers... etc." in his first post, and referenced them again in the second -- so he obviously missed the point that we are not using any hosting provider. The server is sitting right here, we have a biz-class Comcast pipeline, and our own collection of static IP addresses configured back to virtual switching inside the box, connected to a pair of VM's running a VPN/Domain Controller on one and a web server on the other. IIS 8.5 runs the web server, and here we are with Moodle residing on one IP address (.US as the URL) and WordPress occupying the other (.COM). Somewhere amid all the confusion are a collection of .INI files, htaccess, and other ones that come to mind from when I did this before about 4 years ago. Of course, at that point, it was WinServer 2008, some dozen odd editions of WordPress/Moodle earlier, etc. * Isn't this enough of a FAQ that it could be found in a "help" file at least, and built right into the program? (Hence, why I chose this particular forum for the initial volley.) Surely I'm not the only person that has had this situation present itself. * I will take you up on your offer. If there is a step-by-step procedure for fixing all necessary files to increase the file size limit, I would be GREATLY appreciative. Angst to the side (pardon me for wearing it openly), I'll share it with my technical assistant, and together we can probably solve the problem. I won't guarantee the 17 minute 14 second challenge you presented, but we'll hit the stopwatch and see what happens. smile Aaron
In reply to Aaron Bolinger

Re: Increase of File Sizes

by Derek Chirnside -

Just one minor point, it was a 7 minute 14 second, not 17 minutes.

"Not seeing any word processing tool bar here to use bullets, indents, etc. either" you need to get this sorted.  You should see a toolbar.  Check your Preference > Editor preferences


Seriously, how valuable is a $200 per hour tech guru that can't do the basics, even if he/she is working probono - you won't get the system sorted, unless he/she reads a bit of the basic help on the docs.  To repeat my question, have you looked at the docs?

"Most of the documentation in these CMS programs make the presumption we're installing on Linux"  Moodle is not a CMS.  And for Moodle, this statement is wrong.  See https://docs.moodle.org/30/en/Windows_installation  Sure Linux etc is much easier, cheaper, faster and easier to use, but there are installs of Moodle on the darkside out there.

"The server is sitting right here"  I'm not sure what to say here.  When I have a server "sitting right there" [as I do], if I need help, I check the docs and I find someone who knows to help with it to fill in the gaps where I don't know.  I never make assumptions about posts like yours: you may have lots of crazy reasons why this is not your first port of call or not possible.  Also: It's often difficult for you to be the middle man.  

Fact: you need to work with the server to get Moodle how you want it.  
Fact: Angst may be a reality.  Opinion: you need to move past Angst and work step by step to a solution.  Opinion: "Firing volleys" [to quote you never helps]  (Ever)  Try softly softly.

Good luck, as I said in my last post.

-Derek




In reply to Derek Chirnside

Re: Increase of File Sizes

by Matt Bury -
Picture of Plugin developers

At $200 per hour and not getting very far, it'd be cheaper to buy a shiny fast new server and set up a LAMP-stack + Moodle.

In reply to Aaron Bolinger

Re: Increase of File Sizes

by Aaron Bolinger -

Ok, I am now getting the impression that providing assistance is secondary to some other agenda.  The machine on which Moodle is running IS a "shiny new" server Matt.   In fact, I had to buy it TWICE because of a direct lightning strike last summer.  But whatever.  That is irrelevant to the subject of knowing which files to modify to make the defective programs under it (PhP, whatever) take larger files into the courses.  (I consider it a built-in defect, connected to an academic world that wants everyone talking in truncated tweets, rather than having the ability to use the syllogism -- but again, periphery subject matter.)

That's what I want to know how to do -- increase the file upload limit.  Not a major request.

I suggest that "research" (or developers or whichever geek squad is in charge of such things) create some plug-in or widget for the purpose of making it easier on the users.  It's a simple request.  If you can't for whatever reason, fine.  It was a suggestion.  No more, no less.

To answer the obvious, no, I cannot find information in your documentation on how file size upload increasing can be done in a Windows world, on our own server.  Nor do I have a "host" to complain to, or switch from.  If you want the reason we chose to move away from hosted, I would be glad to explain that.  But again, it's a peripheral issue, not fixing the file size problem I am having.

If Moodle forum people can't answer the question about their own program, then I doubt a white-hat hacker from the NSA would be able.  My helper is neither, for what it's worth, and neither am I.  I've been working with and in the Microsoft world since DOS 3.2.  That too is irrelevant about where SQL, PhP and Moodle are concerned.  It's my server.  Let me worry about the ramifications involving memory, bandwidth, etc.  I'm only asking "how to" take it to whatever limit I decide to put on it.

If I would have found any info on this site about it, I would not waste your time or my own asking the question of "how to."  If it's there, I've missed it.  I have bought manuals on Moodle.  I have posted here (only to be insulted, and to have you insult my tech friend), and am no farther ahead now than before.

I'll review replies to see signs of an answer -- but I'm not being insulted further.  Thank you for you time.

Aaron

In reply to Aaron Bolinger

Re: Increase of File Sizes

by Derek Chirnside -

You say:  "That's what I want to know how to do -- increase the file upload limit.  Not a major request" and "If it's there, I've missed it"

I agree this is not a major request  I was suggesting you may have got there a little faster with a little less angst.  I'm sorry this offended you.  I was not insulting your friend.

Trying another tack then.

  1. Try Googling increase the file upload limit MoodleThe top link will help.
  2. This is the second link: https://moodle.org/mod/forum/discuss.php?d=224311  on the same Google search - it is one of 20 or so discussions in the forums on the questions of increasing file size limits for upload.
  3. The third link is a youtube video to do this. 
  4. Did you follow the links on the page I sent you?
    You can click on the bottom link on the page I sent you in my last post (Installation - a whole page of topics and click on he file size topic) or the forth bottom link (Manual install on Windows 7 with Apache and MySQL) and everything is there, and it's probably the best we can do as an open source project.

One of these suggestions should help.

I suggest: Get your buddy to have a read over these if you still can't find a PHP expert, even both of you together.  If there are any specific parts of the pages you don't understand, than ask.  Very very specifically.  Like "I can't find the folder with the php.ini file as it asks in step 3 of page xx" etc.  It is difficult to help if you are not specific in a post.  

LIke I said, if the docs are inadequate, they are a wiki and we can fix them.  

-Derek





In reply to Aaron Bolinger

Re: Increase of File Sizes

by Matt Bury -
Picture of Plugin developers
Re: a shiny fast new server, I was merely pointing out that the time you're spending trying to fix something that isn't recommended in the first place, i.e. Moodle on a Windows server, it'd be easier and quicker to go the recommended route and install LAMP stack + Moodle. It's like installing a Linux desktop and complaining that it's difficult to use MS Word on it.

If you still need a Windows server for other applications, it's still cheaper, easier, and quicker to use 2 servers, 1 for Windows and 1 for Linux. Even Microsoft uses Linux for some things.

Increase the PHP upload limits on a Windows 2012 server? Let me Google that for you: https://technet.microsoft.com/en-us/library/hh994608.aspx

Derek has also provided the relevant Moodle-specific information that you need on file upload settings.
In reply to Matt Bury

Re: Increase of File Sizes

by Colin Fraser -
Picture of Documentation writers Picture of Testers

And Aaron, I started Moodle as a complete newbie, with some db/js/html experience, no server knowledge, no real programming apart from Turbo Pascal, C++, and a sprinkling of Assembly, and found the learning curve of Moodle a little daunting. I also found there was a large difference between the English language I used and the English used in Moodle Docs, they seemed to be related, but I was never quite sure what that relationship was. 

tongueout

Very frustrating, but I did find out that the issues were not that difficult, and as I learned more, it became simpler. I relaxed, took my time and coming from a WebCT and BB background, Moodle was just so much more, and it actually worked. I would suggest that Derek is pretty spot on on his comments about employing an expensive programmer who complains about the difficulties of reading Moodle Docs, because that is where it all starts from.

Good luck....      

In reply to Colin Fraser

Re: Increase of File Sizes

by Aaron Bolinger -

Ok men ... all links, vids, etc. now assembled so when we band of brothers reassemble at the server, we can attack this problem (and a few others).

Colin: server work of many flavors has been foisted upon me by default, either because I was fool enough to accept the projects -- or no one else really wanted to try.  Programming?  You're light years ahead of me with any of that.  I never took even a course in basic at the college level.  Got my experience with it all because someone had to do it, and I got elected.  In 86 we had the classic office "sneakernet" of the era, and I had the "big" hard drive (30 mb) and the printer attached to my computer.  That was a DOS system, and WordPerfect 4.2 at the time. (I still use WordPerfect, by the way...) I got to run the print jobs.  I've upped my skill set over the years, to be certain -- but no one person can be skilled in ALL the aspects of this stuff.  I'm pretty good with administration, I can punch down cat5 cables, wire an office, build the server at the hardware level, tinker inside BIOS, install and argue with the (Windows) OS, add users, set folder permissions -- all the stuff that Windows server typically throws at me.  But the inner workings of code between OS, PhP, SQL, etc -- way over my pay grade.  And thanks for the words of encouragement.  Somehow I muddle through such projects -- but seldom on a very tight clock.  If it looks like an autoexec.bat file, I can probably write it.  Beyond that, not so sure... smile 


Here's the thing with this whole "file size increase" situation.  I know there are logical reasons for keeping it real  -security, performance, whatever.  But remember, Bill Gates himself once pondered why ANYONE "would need more than 640k of RAM!"  Look at where Moodle (academics) is heading, and maybe I have discovered (or am reporting something) that R&D should consider.  Our servers now are not (as they were on my 80's machine) measured in 10MB intervals.  We're talking levels above even Terrabytes at this point.  Yet Moodle (or php or whatever) is still saying I can't go above 2mB with a file??? 

I look at that and think someone has released a really CRUEL joke inside the program.  Yeah, there's a switch on it.  Won't go any higher.  Hmm. 

There are "blocks" of resident data here (Inside of Moodle) that we refer to as "courses."  Ok, "add a resource" (file).  This file is a textbook, a PDF, that one of our instructors authored.  Yep -- way bigger than 2 MB.  Heck, I have syllabi for my own courses that bump the edges of 2mb.  That's just the lesson plan, with embedded graphics, whatever. I want the textbook with the course, not somewhere else.  Inside, where the student is--with the lesson plans, inside the Moodle course where he has access.  In one of my courses I use an 1800's era textbook (we are recreating "classic" curricula) that is now a 300 MB PDF.  We also have the full 9th edition of Encyclopedia Britannica on our server in PDF.  Our PDF library is nearing a TB on its own. 

Sorry Aaron, even on a good day (according to Matt) we should stay below 40 MB with file size.

So now what? Upload it to a file sharing host, and link back to it?  Build an FTP site and set permissions on that?  Why should the student take the course then?  He'll just DL the book from the file share, and that's that.  Or, he'll wonder why our "made for academics" program (Moodle) can't handle a 5 mb file. 

Do you see where I am in this picture?  Midway between workarounds and just plain goofy in a world of 500 MB "standard" file sizes at this point (video lectures, etc.).  Oh wait, no, it's still a 2MB limit over in this (PhP/Moodle/WordPress) world.


Matt: Thanks for the most recent post, but please don't try to read between the lines.  Everyone here is doing that to some degree, and in the process some really bad presumptions are being made.  There's no real reason for me to rebut any of them, but just as an example of it, the notion of the Linux server as a 2nd machine was one you proffered.  If I wanted Linux, I would not have had to even buy the extra hardware.  I could have had a VM built, and Ubuntu (or whatever) loaded on that, right on the windows server. 

Here's the thing, I know far less about Linux than I do molecular physics, and the LAST thing I need (as Administrator for this system) is yet ANOTHER operating system to contend with -- be it on another piece of hardware, or in a VM inside the first tower.  Simple is better, and without a Linux guru around, no way Jose.  No offense intended to Linux people here -- great stuff, works for millions, whatever.  I couldn't boot it.  So I'd be a bigger idiot than I already am if I had added it to my current complicated situation.  Indeed, my assistant and I discussed it.  He knew what I did -- that if he loaded it on the machine, I'd be on the phone with him every 5 minutes.

Derek:  I am following your suggestions and links.  That's what I started out needing -- help finding the answer, and you came through.  Thank you.  Unless something really wackadoodle happens along the way, let's consider it "Issue resolved" (even though I have yet to implement the findings).  I have far too much to do just rebuilding the courses inside the program caused from the disaster previously to continue dialog.  Spring semester for us starts March 1.  By then, I have to rebuild not only the Moodle site, but 10 others in WordPress.

Thanks all!!!

Aaron

In reply to Aaron Bolinger

Re: Increase of File Sizes

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Aaron, for most of my life in computing "...because I was fool enough to accept the projects -- or no one else really wanted to try..." mine was the second one, except I would say no-one else was fool enough to try. Yep, I used a x286, and once paid $400AU (about $370US then) for a 40MB HDD and wondered what was I going to do with all this disc space. 

Sorry to add to your woes, "....By then, I have to rebuild not only the Moodle site, but 10 others in WordPress..." Some very recent reports suggest that WordPress is experiencing some serious lapses in security, or WordPress sites are being targeted by some well armed hackers, so perhaps you may want to consider something like Drupal or Joomla, but there is an alternative. 

You have your server set up, you can, using a plain text editor, something that uses a UTF-8 charset, (ie not Windows native Notepad), and you can edit the server iis.ini file (I think it is) to allow PHP to run, you can run your Moodle in the server, or you can do something wildly different and use Apache Server. You can set up the MSSQL, not my favourite, Maria or MySQL or PostGreSQL databases, or even Oracle, but that is not without problems, and install PHP, database before PHP, then you can add anything you like to the public www folders. You really don't need to use WordPress. 

Having said that, if you want to set up multiple Moodles, then obviously they need be named differently, with different IPs, they need to be using different cookies, and they may, or may not need to be using different databases. Start with one, set it up using whatever bits and pieces you need, Go to the PHP.ini file and change a few things, all the documentation for that is here. Follow that and you'll be OK. 

Once you set up one, and know that works, install a second one in a different folder eg, all Moodles in a Moodle folder , /Moodle01, /Moodle02, etc or /Math, /Engineering  and so on. Go into the Moodle folders and make sure that as Admin you can get in. You won't need to do anything more to the PHP.ini file, but you will need to have each database named differently, UNLESS you only use 1 database and 1 moodledata folder for all your Moodles. You can set all your Moodles up and point then via the config.php file to one database. If you choose to use 1 database, then just clone each Moodle codebase. You can set each of them up completely differently if you like, but still have a common database and moodledata folder.

I know all this sounds really complex, but break it down into one step at a time and it becomes really simple.        

  


In reply to Aaron Bolinger

Re: Increase of File Sizes

by Derek Chirnside -

Aaron, Just in case it is of interest, this is another recent thread conversing about Windows.

https://moodle.org/mod/forum/discuss.php?d=325852

-Derek

In reply to Derek Chirnside

Re: Increase of File Sizes

by Michael de Raadt -

I've shifted this discussion to the General Developer Forum as it's not really research related.

In reply to Aaron Bolinger

Re: Increase of File Sizes

by Derek Chirnside -

"all links, vids, etc. now assembled so when we band of brothers reassemble at the server, we can attack this problem (and a few others)"

Well done Aaron.  

  1. Just curious: how did you do with the seven minute challenge?
  2. I've been wondering whether to not to post this, but I will.  
    I can't recall any questions or requests for help in your posts in this thread as to any suggestions about the best way to set up Moodle to meet the as you describe in your posts.  But If you ever did ask, I'd suggest a file system repository.  You are heading down a path that is unnecessarily complicated on at least two fronts.

I'm not actually sure if a post gets moved if the subscription actually goes with is.  We shall see.

-Derek

In reply to Derek Chirnside

Re: Increase of File Sizes

by Aaron Bolinger -

It does appear the subscription moves with the post.

7 Minute Challenge not yet attempted.  I've been rebuilding courses and other aspects of the recovery, and haven't had assistance on the server side of late.  I do thank you for the follow up, and wonder what sort of file repository you had in mind.  Simple enough sounding -- plenty of TB of storage space, and the files are pretty much on the same machine anyway (albeit on a different VM).  You thinking FTP "link" instead of putting them in Moodle?

In reply to Colin Fraser

Re: Increase of File Sizes

by Derek Chirnside -

Aaron, It really does sound like you have had little experience, you or your buddy in the open source/community support software scene.

Here is the link to another conversation that has some different aspects to what we see in this thread that may provide a model for a different approach: https://moodle.org/mod/forum/discuss.php?d=325620

For instance, this post:

"Backup just a moment.  I am not fluent with the server stuff but I am a techy person and learn quickly. On a Windows Server (or in Moodle) where do I access $CFG->dataroot to answer your inquiry?
I am not certain how this machine was set up with the caching.  How would I check?"

This is the whole post.

Here we see no accusing Moodle of being 'stupid', PHP as being 'defective', not quoting at length a pedigree, no defining the coders as being out of date, accusations of mixed motives or demands for something to be fixed.  Instead thoughtful questions back, and a logical step by step approach to the problem in hand.  We see an assumption of order in the problem, and underlying this a series of steps to a solution.  There is no "I don't like your solution, the system sucks".  And there is a wise use of Google and searches.

I bothered to engage in this thread just in case you were going to be around for a while and a maybe little input may have helped with some of the wheelspinning we could see in your post.  I realise we have not talked pedagogy.

At least we have got your formatting in these posts sorted.

My 2c on this Friday afternoon.  I'm signing off now.

-Derek



Average of ratings: Useful (1)