First, it will help us of you let us know what system you are using for your Moodle installation:
Server OS? Microsoft? Linux?
Web server? Apache? IIS?
PHP version?
MySql? or PostgreSQL?
Depending on your situation, the data directory, usually named 'moodledata', is 'above' the installation directory of moodle. This directory needs to be writable by the server (Apache or IIS) and the path needs to be specified in the config.php file under the moodle directory. Something like this:
$CFG->dataroot = '/home/myhome/public_html/moodledata';
The actual path will depend on the system you are using.
Re: while instalation it says data directory not found
Moodle needs some space on your hard disk to store uploaded files and other documents, so you should create a directory for this purpose somewhere on hard disk , but remember that directory should not be accessible via a web.So as per me create some where outside the web directory.
Points to remember
1. Give the path of the moodle directory during the installation steps correctly.
For example
Suppose that you have created the moodle directory under the c:/Sachin/
so you have to give the full path as c:/Sachin/Moodledirectory/
2. Give the permission too.
I hope this will slove your problem.
Thanks
Abhishek
Create a directory for this purpose somewhere. For security, it's best that this directory is NOT accessible directly via the web. The easiest way to do this is to simply locate it OUTSIDE the web directory, otherwise protect it by creating a file in the data directory called .htaccess, containing this line:
deny from allTo make sure that Moodle can save uploaded files in this directory, check that the web server software (eg Apache) has permission to write to this directory. On Unix machines, this means setting the owner of the directory to be something like "nobody" or "apache".
On many shared hosting servers, you will probably need to restrict all file access to your "group" (to prevent other webhost customers from looking at or changing your files), but provide full read/write access to everyone else (which will allow the web server to access your files). Speak to your server administrator if you are having trouble setting this up securely.
First, make sure that the moodledata directory exists. It should be in the directory above 'moodle' on your server. Depending on your distribution, it might be different. However, the most common place is here:
/home/myhome/public_html/moodledata
Where 'myhome' is the home directory of the installation. Make sure that it is writable by the apache server. Usually this is 'apache' or 'www-data' or 'nobody'. Once again it will depend on the distribution you are using.
Second, make sure that the config.php file below the moodle directory has the exact path listed as the moodledata file:
$CFG->dataroot = '/home/myhome/public_html/moodledata';
That should do it.
Finally, it is a good idea to post to the forum so that the other participants can benefit.
hi thanks a lot again,Hi Sachin,
at last i have suceded to create that data
directory but now i am facing one more problem...
after creating the datadirectory it says unable to
create directory cache and sessions in moodle data
directory..
sorry for not posting in forum... reply asap..
thanking you,
sachin
You must make sure that the directory and anything below it is writeable by the web server. Usually the command from the console:
chmod -R 777 /home/myhome/public_html/moodledata
should do it.
I'm having this same problem too...
My server is running Linux on Apache 2.0.46 with php 4.3.11. Safe mode is now off too. All php settings pass.
I've created a subdomain and uploaded all files. I've created a datadirectory, my hosts have changed the owner to 'apache' and it has full access writes.
Yet it finds the Moodle directory fine?!?!
What have I missed? What am I doing wrong?
Working now