(You can move this to the documentation component, but I thought the sqlite folks might want to see it)

I'm trying out SQLite for the first time. After some hasseling to get SQLite and PDO installed, which I managed to do, I pulled up the INSTALL.sqlite.text file.

It says I have to put in the path to the file. Since it's my test box, I chose sites/default.

This was a bad choice it turns out - when I chmod the sites/default file after installation so it's not writeable, the db cannot be accessed. Apparently SQLite not only needs the db *file* to be writeable (which it is) but the directory it's in also needs to be writeable.

Assuming this is generally a requirement for SQLite and not an artifact of my particular setup (latest ubuntu, installed via apt-get install sqlite php5-sqlite, and running php 5.3.x), then I think we should add something like this to the install.sqlite.txt file:

Both the database file and the directory it is in must be writeable by the web server.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

puregin’s picture

Status: Active » Needs review
FileSize
3.43 KB

I ran into similar issues.

I'm attaching a patch for INSTALL.sqlite.txt which I hope will clarify things for people.

jhodgdon’s picture

Status: Needs review » Needs work

Why did you feel the need to re-wrap the file? It should be wrapping at 80 characters, and it was fine before. Please just change the parts that need to be changed...

Also, what you wrote is incorrect. You do not at all need to edit settings.php. The instructions that were there in the file worked fine for me, except that I needed to make sure that the directory where I told it to put the file was always left as writeable by the Apache process.

puregin’s picture

You're right re: the settings.php file - I'd run into some other issues earlier, and thought that I'd fixed these by making the changes to the settings.php file.

I've removed that section and restored the original wrapping.

Should we specify a minimum version for SQLite?

Also, should we mention that SQLite support is not as mature as that for the other databases?

jhodgdon’s picture

We don't specify the minimum versions in the other INSTALL.(database).txt files, so we shouldn't specify it here. I also don't think we should mention the immaturity of SQLite support. The purpose of this file is to tell people how to install with SQLite as opposed to other databases.

Those other topics are covered elsewhere, such as http://drupal.org/requirements and the main INSTALL.txt file.

So... back to this patch:
- There's an extra blank line you added in this patch, which is not consistent with the formatting elsewhere in the file.
- When you submit a patch, please change the status to "needs review".
- The changes you made do not clarify anything, in my opinion, that was not already stated in the existing INSTALL.sqlite.txt file. I think it needs to clarify that not only do you need to have write permission on the directory in order to create the database, but also later on when you are running your Drupal install, you still need to have write permission on not only the database file that is created, but the entire directory. That was what was surprising to me -- obviously you should expect that you need write perms originally in order to create the file, and that the file needs to be writeable going forward, but it was a surprise to me that the entire directory needs to remain writeable for continued operation.

jhodgdon’s picture

Status: Needs work » Needs review
FileSize
1.07 KB

Here's a new patch... Fixed one spot near the end of the file also, which I thought was worded in a sort of confusing way.

puregin’s picture

Looks good.

One very minor suggestion - maybe mention explicitly that the directory remain writeable *by the webserver*.

Crell’s picture

I'm fine with #5, but will defer to the SQLite maintainers. They can mark this RTBC if they have no other feedback.

Damien Tournoud’s picture

Status: Needs review » Needs work

Agreed with #6. Could we have a quick reroll?

jhodgdon’s picture

Status: Needs work » Needs review
FileSize
1.09 KB

Good idea. Quick reroll to take care of #6.

Damien Tournoud’s picture

Status: Needs review » Reviewed & tested by the community

Sweet, thanks.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.