Forums | Mahara Community

Support /
Where is dataroot?


anonymous profile picture
Account deleted
Posts: 5

12 February 2009, 3:24

My Mahara cannot find dataroot! I've seen all the posts on this topic, and tried just about everything, and I still can't get past this error.
I have a folder called public_html. In that is a folder called mahara where I have put the contents of htdocs. I have created a folder called maharadata in public_html and changed the permissions.
So what do I put in my config file?
$cfg->dataroot = 'home/public_html/maharadata' doesn't work. Do I need a username? Where do I get that from?
Any help much appreciated!

anonymous profile picture
Account deleted
Posts: 228

12 February 2009, 4:06

If public_html is in your homedirectory, your dataroot needs to be:

 /home/YOURUSERNAME/public_html/maharadata.  Note as well as your username the / at the beginning :)

Your username is the directory name that public_html is inside of.

anonymous profile picture
Account deleted
Posts: 3

12 February 2009, 5:19

I thought this had to be outside of your public_html directory for security. That's how I've got it on my installation, perhaps I wrong? If I am correct, the path would be:

  /home/YOURUSERNAME/maharadata. 

anonymous profile picture
Account deleted
Posts: 228

12 February 2009, 6:07

Yep - dataroot should definitely be outside the document root for security.

 However, iirc Mahara will whinge about it but still run, if it's inside the document root.

I was just responding to the incorrect path in the original post, and it was pre-coffee, else I would have picked up on that too.

Brian Lockwood's profile picture
Posts: 19

12 February 2009, 14:10

Hopefully to add to the understanding here. There are three bits to mahara,

First, the htdocs which is the web site and on a server with user-web sites, the contents of htdocs can be put into a folder called mymahara (say) and the site will be at http://<your web address>/~yourusername/mymahara
The htdocs files are the only ones that are accessible by the people accessing your server via http.

Second. There is also, a folder where mahara puts all its data files etc. and this can be anywhere at all on your server where apache has the rights to write and read. If you can only access your own home, then this can be in your home directory and the path will usually be /home/<your user name>/<Name of mahara data folder>. People accessing your site via http cannot see this although users accessing via ftp might. This is why you should put the dataroot folder below public_html because mahara will whinge and I thought it would refuse to continue.

This is the case on most nix like systems.

However for Solaris, the folder could be /export/home/<your username>

On a mac, this could be /Users/<username>/<Name of mahara data folder>  and also on a mac, there is Sites rather than public_html.

Finally there is the database and because this file is entirely mediated by postgresql or mysql, you shouldn't need to know where it is but you can search for it by database name if you like. (find / -name <databasename> will work for mysql. )

anonymous profile picture
Account deleted
Posts: 228

12 February 2009, 15:41

Yep, it does refuse to continue. I knew it whinged but wasn't sure what level of whinging occurred :)
anonymous profile picture
Account deleted
Posts: 5

12 February 2009, 17:36

Thanks everyone. I've got passed that error with /home/<USERNAME>/maharadata. Note slash at the beginning. Got a few other problems with unexpected T variables on every line from 90 in my config.php file, but I'll fiddle a bit longer and post separately if I get stuck. Really looking forward to it bursting into life! 
anonymous profile picture
Account deleted
Posts: 31

14 February 2009, 22:02

I have the same problem.

my config.php is

$cfg->dataroot = '/home4/isaglob1/maharadata';

It doesn't seem to be reading. This maharadata folder is an httpd/unix directory. But I'm not sure if that matters. Hopefully someone can point me in the right direction, as I'm a novice on this.

anonymous profile picture
Account deleted
Posts: 228

15 February 2009, 7:31

Hi Ricardo - exactly what is the message you're getting? Is there anything in the error log? Have you checked permissions on that directory -the webserver needs to be able to write to it.
anonymous profile picture
Account deleted
Posts: 31

15 February 2009, 15:41

Thanks for the reply and so quickly. I'm not sure how to check the permissions or the error log. But I'm gonna go figure it out.  I do know that my mahara data folder is outside of the public_html  folder and on the webserver and that it, the maharadata folder, is httpd/unix-directory.

How do I know when the webserver is able to write to it.

 An, just so it's clear to me, all we're talking about is rewriting a little bit of the config.php file, right?

14 results