Hi folks. I'm setting up a small database with a simple front end of HTML forms, and CGI written in Perl to process it. Most of it seems to be working, but I'm struggling with what appears to be a permissions issue on the database file, but I can't figure it out.
I'll preface this by saying I'm new to both HTML forms and CGI, though I've been working with Perl+SQLite for a while now, and I haven't run into this sort of problem before.
I'm not going to go into a ton of detail on my setup just yet, hoping someone can spot a noob error before I write a novel. But if that's not the case, I'll add as much detail as I can.
Most of this setup seems to be working. I've verified that my Perl CGI script is receiving the data posted by the HTML form. I'm able to use Server Side Includes to insert some dynamic data into a page. I've successfully pulled data out of my SQLite database and displayed it. The problem comes up when I try to write to the database from a script... it fails. The first time I tried, I got this message in my Apache errorlog:
Code:
[Tue Aug 10 19:58:47 2010] [error] [client x.x.x.x] DBD::SQLite::db do failed: attempt to write a readonly database at /usr/lib/cgi-bin/action_add.cgi line 46., referer: http://x.x.x.x/rw/add.shtml
...which was straightforward enough, as I hadn't set the group write permission. I set that up, tried again, but no luck:
Code:
[Tue Aug 10 20:00:14 2010] [error] [client x.x.x.x] DBD::SQLite::db do failed: unable to open database file at /usr/lib/cgi-bin/action_add.cgi line 46., referer: http://x.x.x.x/rw/add.shtml
All files involved are definitely readable by the webserver. I know it sees the database, as it can read from it just fine. I even tried setting permissions to 777... no luck.
So... are there any glaring oversights here? Or do I need to describe my setup a bit more thoroughly?
Thanks.