Installation problem - Cannot create data directory

Installation problem - Cannot create data directory

Megan Beebe -
回帖数:5

Hellosmile, I am working on installing the Moodle software so that our School of Ministry (I work at a church) will be able to have a good online learning environment. I am truly appreciative that this type of software is available for our use since we are quite small at the moment.

I have run into a problem where I cannot get beyond the screen that asks for the web address, moodle directory and data directory. My inputs are as follows:

Web address: http://alifequest.com/moodle
Moodle directory: /home3/alife/alifequest-www/moodle
Data directory: /home3/alife/alifequest-www/moodledata/

I followed the instructions that said the data directory should be added manually if the software is not able and it was added. When I went back to install though I still get the same error when I hit that screen. I tried it with a trailing slash on the data directory and without it but still no luck.

I went back to my ISP and discussed permissions with them - particulary that they should be set to 755. They responded that they set the permissions for the moodledata folder to 755 and they looked at what I was typing in and said that it should be fine.

They are at a loss right now and told me I should go to you. One of the other documents I stumbled upon gave instructions to someone to take a look at the PHP.ini file. I followed the steps to see the php.ini file on the server and this is what it says . . .

PHP Version 4.3.10
System: Linux host3.harrismedia.com 2.4.31 #5SMP
Build Date: 5/5/2005
Configure Command
Server API Apache
Virtual Directory Support=disabled
Configuration file pat  /usr/local/zend/etc/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build = no
Thread Safety = disabled
Registered PHP Streams = php,http,ftp,https,ftps,compress.bzip2,compress.zlib
and there was a section with a bunch of stuff that I didn't understand as follows:
'./configure' '--prefix=/usr/local/' '--with-apxs=/etc/httpd/bin/apxs' '--disable-cgi' '--enable-versioning' '--enable-pic' '--disable-posix-threads' '--enable-memory-limit' '--with-pear=/usr/local/lib/php' '--with-openssl=/usr/local/ssl' '--disable-debug' '--enable-magic-quotes' '--disable-rpath' '--with-bz2=/usr' '--with-zlib' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-exif' '--with-curl=/usr' '--enable-dba' '--with-gdbm=/usr' '--with-flatfile' '--with-inifile' '--enable-dbase' '--with-gd' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-freetype-dir=/usr' '--with-gettext=/usr' '--with-gmp' '--with-imap=/usr/local' '--with-imap-ssl=/usr/local/ssl' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt=/usr' '--with-mhash=/usr' '--with-unixODBC=/usr/local/unixODBC' '--with-mysql=/usr/local/mysql' '--enable-sockets' '--with-regex=system' '--enable-wddx' '--with-expat-dir=/usr' '--enable-xslt' '--with-xslt-sablot=/usr' '--enable-inline-optimization' '--with-pspell=/usr/local' '--with-pfpro=/usr'

Can anyone offer some direction on this problem in light of the above information?

Thanks, Meg

回复Megan Beebe

Re: Installation problem - Cannot create data directory

Jonathan Moore -
Megan,

Do you get any type of error message? If so please include it here.

permissions to 755 may not be enough in itself. Which user owns the file can be an issue as well. Sometimes, depending on the setup, it is necessary for the user that the webserver is running as to own the moodledata folder. This is common examples are user: nobody, www-data, or apache.

Additionally if you place the moodledata folder in your webroot, which seems to be the case from your above example, then it will be possible for users to bypass the moodle security and directly access uploaded files such as assignments. If your web host doesn't support another mode besides this, then you should setup a .htaccess file to restrict web access from this folder.
回复Jonathan Moore

Re: Installation problem - Cannot create data directory

Megan Beebe -

The error I receive is:

The 'Data Directory' you specified could not be found or created. Either correct the path or create that directory manually.

The first step we took was to add the directory manually.

The .htaccess file was created as per instructions in the installation manual.

回复Megan Beebe

Re: Installation problem - Cannot create data directory

Jonathan Moore -
Magee, ask them to try setting the ownership of this folder to the same user the web server is running as and then re-run the install and see if it goes throught this time.
回复Jonathan Moore

Re: Installation problem - Cannot create data directory

Megan Beebe -

Well, thanks are in order . . . I forwarded your response on to my hosting company and they made the necessary changes. That did it. The package is installed!

As I have been working through the different challenges of installing the software I spent time looking through the forum to read of the same problem with other folks. In some of them they expressed an extreme frustration with their hosting company.

I just wanted to pass on, for anyone who reads this in the future, the site of my hosting company is www.harrismedia.com. For an extremely reasonable price I not only never have downtime with my regular website but now they just spent the last 5 days or so going back and forth with me and making changes as we found them. I would highly recommend them!

Thanks again for your help.

Meg