Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: File upload size.

Talk:File upload size

From MoodleDocs
Revision as of 20:59, 8 March 2010 by Jon Witts (talk | contribs) (→‎Attempt 2!)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Attempt 2!

Jon Witts 23:23, 7 March 2010 (UTC) - OK so I am going to have a second stab at this ;-) Let's try and get the set of questions we need to ask right first - then we can concentrate on getting the answers right! User:Jon_Witts/file-upload-v2

Sorry Jon, I am currently having issues with this on a host server and do not have any trouble with Windows or Ubuntu based upon other instructions!. I will take a look at your subpage file-upload-v2. Apologies if I stepped on your edits on the main page. I did not check the user page. My bad, and please feel free to revert mine. --chris collman 20:36, 8 March 2010 (UTC)

That's OK Chris; it always seems to be the hosted servers that cause the problems! It seems fairly easy to change these settings if you have full control of your server, but hosting companies like to lock things down a little tighter ;-) Don't worry about any changes - the more we have working on this page, the more likely we are to get it right. Jon Witts 20:59, 8 March 2010 (UTC)

Attempt 1

The steps I have detailed here are tried and tested for both Windows and Ubuntu installations. I do not have access to other systems, so can not provide tried and tested ways to accomplish this on those systems. Anyone with those details, please add them to this page!

I have tried to link to all other areas of the docs that talk about achieving this; but appreciate I may have missed some. as you can see from the See Also section, this topic is addressed in lots of areas in the docs. My feeling was that whilst it was addressed in a lot of places there was no one single place with all the information in. In my mind, it would be easiest if we had one page that we could point all the other pages at, rather than the novice user having to navigate through multiple pages to find the situation that relates to their set-up.

I have marked the sections with the stub tag that need expending - please do so if you have something to add. :-)

Jon Witts 08:41, 19 September 2009 (UTC)

Thanks Jon, I have just edited the Beginning Administration FAQ to jump straight here. So much simpler and easier than what I had there. Cheers : Colin Faser 09:00 20 September 2009

Structure and content issues

--Colin Fraser 22:27, 7 March 2010 (UTC) Looking over this with a considerably more jaundiced eye, it is easy to see it is not providing the best information in the best way really. The instructions are good, but it needs be simplified a lot more. For example: I have placed a a descriptor of the issues surrounding file sizes first and why values need be altered outside of Moodle - if you do not like it, change it, but leave it. This also means we will need to reconstruct this page a bit to write to the levels of changes as well. I also suggest the structure should offer a simple and generic solution in the first block - something that says "Modifying the php.ini file is usually the most appropriate method for changing upload file sizes..." and follow that with a description of the key variables names and values. Thereafter, specific instructions for different OS' can then be explored. Thinking about it, many people using these instructions will be quite literate in their server and php environments, they are possibly tech support people, so these kinds of detailed instructions are likely to be seen as patronizing and time wasting. The majority will not be techies and will need detailed instruction.

Marc Grober 01:16, 20 September 2009 (UTC) Some issues.... In as much as I don't use Ubuntu, I can't comment on whether the directory structure that is mentioned in the Ubuntu install with apt-get is only created through the use of apt-get, and in any case, is that more confusing than setting out standard instructions for addressing php.ini, with exceptions identified or links to explanations elsewhere.

Bottom line is that you say your method is to be used with an Ubuntu apt-get install as I read it, but you don't mention the type of Moodle install, which would arguably totally confuse the user as to what to do..... especially if he does not understand that he needs to look in different places deending on how things are installed.... so maybe for ther ubuntu user he should have a small script which checks how things are installed and then makes recommendations as to what to do..... ahhhh, but there is an app that could be used to do this, find, so maybe we should look for php.ini, but then if changes in that file once we find it don;t work, what do we do next?

Frankly, I think it most important that users know how php.ini is sourced and how they are running php, especially in as much as one need not restart apache if one is running php as cgi.

One issue I continue to run into is well meaning folk telling people what to do without knowing how the target system is configured or is working.

In the Ubuntu case, is there always going to be an /etc/php5/apache2 directory? How is that determined (by user or by virtue of a distro specific rpm install, etc)? Doesn't your method presuppose that the user is running mod_php and what if he isn't? If there is an existing php.ini present, what put it there and shouldn't the user back up a copy before editing?

Your caveat regarding shared servers can be very confusing as many have full access though they are on a shared server.... and if users come to this page first as C says he is doing is this page simply going to confuse them even more? SHould the user work through a more robust key and if so, what are the elements of the key..... and shouldn't the key be appropriately structured, so that the user is access: do you know if you have a php.ini? go to A if you do and B if you don;t.... etc.

btw, you can have as many php.ini files as you want in a php5 installation, the issue is that php5 will only source one and it will source the first one it finds, though you could have a dozen all in legal locations that might be sourced if the system got that far...,.


Jon Witts 12:32, 20 September 2009 (UTC)

I thought I had stated the set-up with Ubuntu that my instructions applied too - PHP5 and Apache2 installed via apt-get and the Standard Moodle package downloaded and installed.

Marc Grober 16:47, 22 September 2009 (UTC) The issue here is whether the user can differentiate your criteria from the criteria identified in the Ubuntu set-up page and the discussion about configuration directories I reference in order to help those who were unaware of the extra configuration directories that may be created.... WHile it may be clear to you that the diff is in how Moodle is installed, my guess is that the newbe looking to these docs for help will become utterly confused without some precursor explaining the diffs.....

I think you may have a point regarding directing users to search for php.ini rather than point to exact directory structures. I will change the docs to reflect such a method. The issue here is that if PHP4 is being used there can be multiple active php.ini files - so which one do we direct them to edit? With PHP5; as you state there can be multiple ini files and only one active; so we must check which is the active one first...

Marc Grober 16:47, 22 September 2009 (UTC) Ahhhhh.... that is why I talk about using a key. Q1. Do you know whether you are using php4 or php5 or whether you have a choice and what do we do about that.... Q15 Do you have shell access. ...... Q34 WHich OS are you using? ...... A15 if you arrived here you are using php4 and you want to be able to alter php4s behavior using a php.ini and you have shell access and you are using *nix so to do this we will create a php,ini file at such and such a location and then link that file to the following directories using the following type of command blahblahblah
As far as php5, we should explain briefly php5's sourcing mechanism, have them do a search for an existing php.ini to try and determine if there is one there already why it is there, and then provide them some choices and guidance as far as selecting and implementing a location for php.ini - and of course breaking out for issues like shared hosting, shared binaries, and mod_php

If Apache2 and PHP5 are installed by apt-get, then as far as I know the locations will always be the same and PHP will be running as mod_php. The directory structure is determined by the package that apt-get downloads. This install method is the same as the one detailed in the docs page for a standard Ubuntu install.

Marc Grober 16:47, 22 September 2009 (UTC) See note above as far as the different set of instructions and the use of configuration directories which are different as between your recommendations and the discussion I mention without providing a clear picture.... so, if the extra moodle configuration directories are created by way of installing Moodle via apt-get than this has to be carefully explained to the newbe because talking about a "standard" install probably tells the newbe little.....
also, just because a particular install method implements a,b,c does not mean that is how it is presently configured on the users system.... so the best practice, again via a key, is to provide ways for the user to identify how php is running and get correct instructions based on that info

I thing I agree regarding structure - this is still a work in progress... Let's get it right, and hopefully help more users through it.

Marc Grober 16:47, 22 September 2009 (UTC) Yes, but ;=} My experience has been that way too many people will ask first in forum as opposed to spending 20 minutes reading the docs (one reason I wanted to tie an active search to the newbe forum posting so that the newbe would be pushed to reading materials suggested as likely providing an answer before their question is posted.... And unfortunately often times people trying to be helpful will tell users to do x or y and that may be very poor advice.... WHile I don;t want to chill the community, I think core docs can help everyone stay educated if everyone reviews same, but again that is not necessarily the case, and my argument that PHMs should be required to contribute to documentation doesn't seem to have caught on.....
While I also understand why Moodle tries to support proprietary applications, I don;t think that means that we need to be even-handed. I think we need to gently suggest to Dewi that IIS etc is proprietary software and that he would be well advised to dump same and place Moodle on an open OS which will make things much much simpler for him in the long run......