My webhost says I need to copy the php.ini file into the folder where the script (resides) is called up in order for the changes to take place.
Currently, my php.ini sits in my public_html
Does anyone know which folder in the moodle file structure this would be?
I suppose I could put it in every directory but I barely know what I doing as it is!
Okay, here is what you need to do.
1. Open the php.ini file provided by bluehost and change the post_max_size and the upload_max_filesize to the value you want. So, to increase the maximum to 50 meg, they would need to be like this:
upload_max_filesize = 50M
post_max_size = 50M
Don't change anything else and save the changes.
2. Leave this in your public_html root and also copy it to the following locations...this is assuming Moodle is installed in a directory called moodle:
3. Also, copy this to the root of your moodledata directory.
Now, log into Moodle and go to Site Administration/Security/Site policies and change the "Maximum uploaded file size" to either "Server Limit" or your new max limit and save.
That should do it.
Just write this down somewhere so when/if you upgrade you can add php.ini back to the appropriate directories.
Did all of that and still to no avail. I am hosting at hostmonster.com and have had the crew help me with this as well, still not resolve helpl my courses will start in two weeks....
I have an account with Bluehost that I use for various testing purposes, so I know this will work there, but I'm not familiar with hostmonster....maybe someone else here has an account with them and can help you.
I would have to suggest that this is going to continue to be an uphill battle for you. There is a thread in the moodle forums about searching for a web host that supports php5, custom php.ini etc and you may want to review that discussion and consider finding a new new weh host who is more aggressive with reagdr to supporting php5, etc.
I'm on 1&1 hosting and have tried numerous approaches.
Add Handler php-cgi .php
Action php-cgi /cgi-bin/php.cgi
to add a local handler and when a call to a .php file comes in to your web site, it is directed via your htaccess file to php.cgi which points to your local php.ini.... or I think so the theory goes. But, you have to use cgi based php not mod-php. And you will have to set correct perms on all the files and directories.
Glad Steve helped you to fix it up but thought I'd post in case others are having the same issue in the future.
If you want to create a modified php.ini on shared hosting (and you are allowed to!) I have found Tip 1, under "Using PHP" on this site to be the easiest way.
If for some reason you need to have php.ini in each directory (e.g. running PHP 4 or your host has it set up that way), use Tip 2.
If you upgrade to PHP 5 and you no longer need a php.ini in each directory, use Tip 3.
But you need to determine whether you are running php4 or php5.
The solution works very well, is very clean and should work (once you have adjusted for the actual locations of files) as long as you are not running mod_php (as that circumvents the cgi bit....) the files referenced are not secured so you can download them as well.... and setting up as suggested should not mess up anything in your existing installation.
I got e-mails from this forum containing copies of posts with the subject How To vs Forum Thread. Some of these were from you. The last of these was from you, with the URL http://moodle.org/mod/forum/discuss.php?d=94601#p418701. So I clicked on the "See this post in context" link, which tried to take me to that URL, but instead it took me to this thread, which does not contain any of the "How To..." posts. Apparently someone pretending to be a moderator split those posts off and I never got the memo!
Not only that, but this thread contains one of my posts, which I was going to mention in my post in the split-off thread.
In any event, the primary (?) question would be, "If you use the split or move feature of the moodle forum, does it change a post's or a thread's URL(s)?" If so, this is arguably very bad!
For instructional purposes, could you explain what you did (operationally, mechanically, logically, etc) so I can make sense of this?
I thought my previous post in this branch of the thread made it clear that I followed the URL in my e-mail which is presumably where the split post used to be, and it went nowhere, so evidently the new post in the new forum has a new URL.
It is unclear to me whether your post is addressed to me, HF, or someone named Don (he is mentioned in a later post of yours). I'm guessing you meant Don Hinkelman, who added several posts in the new split-off thread. I think HF's apologetic post implies that she's the culprit here.
My posting (the one to which you are replying), was actually posted in response to Helen's posting about the move.... asking her to confirm that in fact your problem was the result of the split/move altering the URL of the postings...
And, as I think you suggest, there are a number of other posts still entangled in this thread relating to this issues.... all my fault as I probably should have moved the further discussion to another forum, though I did not for reasons plead elsewhere.
Don, have you obtained hidden powers which you are demonstrating for us??
Splitting isn't the real problem. The real problem is people completely changing the subject of a thread.
People should start a new thread when they want to talk about a "different topic"...otherwise they should leave the original subject alone other than maybe adding something like "solved" to it to indicate the status.
Along with the others I'm glad you found the file and solved your problem, but for the sake of other readers of this forum who are trying or will be trying to find their php.ini file, ...
So far this post has started the same as several others in this thread. But they all have one thing in common. They all claim to know where the file is, at least under certain particular circumstances (php version, o/s, host, etc.) or they refer the reader to web pages that do so. Now here's the whole story:
- If you are using php4 you need a php.ini file in every folder (directory) with php script files.
- If you are using php5 or higher, there may be many php.ini files on your server (possibly left over from php4), but only one is the active one. Modifying any copy other than the active one will do absolutely no good whatsoever. To find the active one, do the phpinfo thing. In the output, near the top of the page, is an item labeled Configuration File (php.ini) Path. This will tell you exactly where the active file is. It's as simple as that.
JL, I really appreciate your post. I know it is quite old. But I happen to be in that same situation, not being able to find where the php.ini file is located. I have installed moodle in a subfolder of domain.com/campus. I have no access to the public folder. When I do the info.php thing I get this info. What is strange is that the file seams to be located on my computer instead of being on the server.. is that so? I am just a teacher so i don't know much about this.