The 'Data Directory' you specified could not be found or created.
The os is Fedora Core 4, Apache is 2.x, PHP is 5.x with GDI support and MySQL is 4.x My problem occurs right at the begining with this error:
"The 'Data Directory' you specified could not be found or created. Either correct the path or create that directory manually."
It's strange, since the directory I point it too has 777 as it's permissions, it's owned by the apache user and apache group. I've tried creating a variety of directories, in a variety of location, all with no success. Any help would be greatly appreciated. I demonstrated this to my admin on the Mac, now the Admin wants me to deliver on linux!
Re: The 'Data Directory' you specified could not be found or created.
There is one suggestion:
Copy or rename config-dist.php file to config.php file and make the all changes according to your settings (dbname, user, webroot...etc) and then point browser
http://your host/moodle/index.php
Re: The 'Data Directory' you specified could not be found or created.
Re: The 'Data Directory' you specified could not be found or created.
Re: The 'Data Directory' you specified could not be found or created.
Also the php that comes with Fedora Core 4 needs to have GDI and MySQL extentions added.
Now it works as expected. Thanks for all who thought about the problem.
Re: The 'Data Directory' you specified could not be found or created.
Similar problem here, although this is on a Virtual Private Server...
I would like to keep the data directory outside the web root, but whatever permissions are given to it, so long as it remains outside the webroot, Moodle (ie PHP) fails to find it. So, despite concerns about security and accessibility, it's now sitting in the httpdocs directory, protected by .htaccess "deny from all".
My setup: PHP 4.3.10 on Apache 2.0.51
I wonder (does any know?) if the following php settings are relevant:
safe_mode on
safe_mode_include_dir novalue
open_basedir /home/domain/httpdocs
I'll do some experimenting shortly, but would welcome any advice.
BTW, what is so bad about putting the data directory under the webroot, so long as it remains protected as described above?
Re: The 'Data Directory' you specified could not be found or created.
Actually, if your using different OS's (OpenBSD) you will find Apache is chrooted and the data directory must be under the chrooted directory. Mine is in /var/www/moodledata.
Jim
Re: The 'Data Directory' you specified could not be found or created.
I am installing on the same sw config - FC4, etc. and got the same error.
Here is how I resolved it:
# chcon system_u:object_r:httpd_sys_content_t moodledata/
# ls -Zd moodledata/
drwxrwxrwx apache moodle system_u:object_r:httpd_sys_content_t moodledata/
This leaves the security that selinux brings (not inconsiderable) intact on your whole system.
Best,
Barry
Re: The 'Data Directory' you specified could not be found or created.
I am trying to install on linux server and getting the same problem "Thed 'Data Directory' you specified could not be found or created".
I tried changing the owner and group of folder to apache. Also tried setting the selinux=0; but still it is not working.
Any other pointers?
Regards
Arvin
Re: The 'Data Directory' you specified could not be found or created.
For starters, changing the owner and group to apache will not do any good at all unless the name of the user and group under which Apache (I presume you are using the Apache web server) runs. The instructions only imply it is usually apache or nobody. It might be neither. It would help if you at least have read access to the httpd.conf file (or whatever file is being used to configure Apache). Look in there for a User directive that is not commented out by a # in front of it. This should tell you what username Apache runs as, provided it is started up by the root linux user.
Also, you said you turned off selinux, but what about safe_mode and open_basedir? They can make it difficult to put your data directory outside the web root because PHP might be prevented from accessing it.
RLE
Re: The 'Data Directory' you specified could not be found or created.
I am having the the same problems as everyone else, but I am a newbe at linux and server tech. I am running Ubuntu os and lampp for the server. So a lot of this advice is going over my head. I can login as nobody as shown above, as far as editing any of the php or conf files I more details as far as which file the code and where to edit it. any help is welcome thanks
Re: The 'Data Directory' you specified could not be found or created.
No problem. But as I take a cursory look over the posts in this thread, in every case that I noticed where a file was referenced, the name of the file was given (I said in mine that the Apache configuration file is usually called httpd.conf because I have seen posts in earlier threads that reported a different name, but it ended in .conf; since you are using lampp I would guess that in your case, it is called httpd.conf). So if you could be more specific about which files you need help with, we might be able to answer you. And when you ask where to edit it, do you mean you want to know where the file is located, that is, what folder (directory)? Or do you mean what program should be used to edit it?
RLE
Re: The 'Data Directory' you specified could not be found or created.
After posting my previous reply, I couldn't get the question out of what I laughingly call my head: how does Apache know the name of the main configuration file if it isn't httpd.conf? So I looked in the Apache manual and found that, if it (or a batch file or shell script that launches or installs it) is launched with the -f option, that option gives the full pathname of the main Apache configuration file. So unless the shell script you use to start up Apache, or the one that was used to install it as a daemon, contains a line that uses the -f option or was run with the -f option, your configuration file is httpd.conf. It would be in the conf subdirectory of the main Apache directory, although this could have been changed when Apache was compiled. The shell script would be called something like apache or apachectl.
RLE
Re: The 'Data Directory' you specified could not be found or created.
Hi
I’m new to linux. I was trying to install moodle in Fedora7 virtual dedicated server using Plesk and/or SSH
I receive the same error message. I tried all the solutions posted here
1- Create the directory manually in different locations such as
/var/www/moodledata
/var/www/vhosts/chroot/var/moodledata
/var/www/vhosts/httpdocs/moodledata
also changed directory permissions, didn't work
2- Edited config.php manually, received the following error
"Error: Database connection failed. It is possible that the database is overloaded or otherwise not running properly. The site administrator should also check that the database details have been correctly specified in config.php".
Even though all parameters are correct
3- Logged in as root tried to edit the /boot/grub/grub.conf
could not find the file
4- I also Tried to edit selinux using the following command
#chcon system_u:object_r:httpd_sys_content_t moodledata
Received error message "operation not supported"
does anyone know what am missing here