Trying to set up Habari using sqlite

55 views
Skip to first unread message

tamaracks

unread,
Sep 5, 2009, 3:48:42 PM9/5/09
to habari-users
I'm trying to set up habari with sqlite. I did the requirements page
and it said I was good. After I choose sqlite on the install screen, I
get a message that says "SQLite requires that the directory that holds
the DB file be writable by the web server."

I was only able to make the error go away by making the owner of the
habari directory the web server user. Even with 777 permissions and
the web server group applied to the habari directory, that writable
error would not go away until I changed the user. This seems wrong,
no?

Tamara

Tamara Crowe

unread,
Sep 5, 2009, 4:54:20 PM9/5/09
to habari-users
Okay, I think I may have mixed up what permissions I had set. I think the 777 was only the top level of the habari directory (as the instructions), and the group did not have writable perms. It would definitely be helpful for the instructions or install to say where it is trying to put the habari.db, which I now see goes in the user dir.

BigFoot

unread,
Sep 24, 2009, 4:35:38 AM9/24/09
to habari-users
I agree with you.
Even better would be to inform the user of that "user" directory
location when the installer returns an error.

rick c

unread,
Sep 24, 2009, 7:31:55 AM9/24/09
to habari-users
Welcome to Habari!

We'll try to make the wiki clearer on this point. Some of the
directions haven't been updated in a while, and when those were first
written, the SQLite db was placed in Habari's root. The location was
later moved to the /user subdirectory to further separate user files
from core files. In the same way, if you are running Habari in
multisite mode, the SQLite db is placed in the appropriate /user/sites
subdirectory, as is the mulitsite's config.php file. At some point,
the main site's config.php will probably be put in /user, also, rather
than Habari's root. A benefit of putting the SQLite file in /user is
that, after installation, you can make Habari's root and /system
directories read only. The directory were the db is has to remain
writable, as PHP needs to be able to create journal files in the
directory.

You're probably right about your applying the 777 only to the top
level of Habari's directory structure.

Who the webserver runs as (at least in the case of Apache), and more
specifically who PHP runs as, depends on how PHP is set up on your
server. If PHP is being run as an Apache module, it is running with
the same permissions as Apache, which will usually be different from
yours.If it is running as a CGI process, it is usually running with
the same permissions you have. As such, if you create a directory, for
example, by installing Habari, you are the director's owner. When PHP
tries to write to that directory, whether it can do so or not depends
on whether PHP is running as you or someone else. From the sounds of
it, PHP is running as and Apache module on your server.

Rick

Christian Mohn (h0bbel)

unread,
Sep 24, 2009, 6:43:01 PM9/24/09
to habari...@googlegroups.com
Someone should copy that reply into the wiki.... :-)
Reply all
Reply to author
Forward
0 new messages