Hi. When I try to write data to an sqlite file via lighttpd and php I get the error:

"Unable to open database file"

When I write the data directly using

$ /usr/lib/cgi-bin/php5 sqlite-test.php

it works fine.

Also, php works with lighttpd when not writing to sqlite.

I've done some research and put the line

extension=sqlite.so

into php.ini, but still no joy.

asked 30 Sep '10, 08:21

slothcheetah's gravatar image

slothcheetah
7637
accept rate: 50%

Which user is the lighttpd daemon running as? It might not have any write permissions to the directory the SQLite file is kept in, or the SQLite file, itself.

(22 Oct '10, 19:39) indienick

Did you restart lighttpd after changing php.ini?

(04 Apr '11, 04:07) Kojans
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×9

Asked: 30 Sep '10, 08:21

Seen: 2,717 times

Last updated: 04 Apr '11, 16:12

powered by OSQA