Richard Lewis
richardlewis at fastmail.co.uk
Wed Jan 10 12:58:29 EST 2007
On Wednesday 10 January 2007 17:45, Michael Rasmussen wrote: > On Wed, 10 Jan 2007 17:28:14 +0000 > > Richard Lewis <richardlewis at fastmail.co.uk> wrote: > > The problem I have is that when I try to execute the SQL UPDATE > > query, the database raises the exception "Database error: unable to > > open database file". > > I've checked to make sure that I can execute the code correctly from > > the Python interpreter, and I can. > > > > So I also made sure that Apache has write permission to the database > > file by setting the permissions to rwxrwxrwx! > > You are sure your webserver does not run in a jail/chroot environment > in which case a running instance of the webserver might never have > access to the required directory? > Um, not as far as I know. Its just Apache 2.2 on Debian (unstable). > What does the webservers errorlog show? [Wed Jan 10 17:12:23 2007] [error] [client c_ip] PythonHandler session: Traceback (most recent call last):, referer: http://server/ [Wed Jan 10 17:12:23 2007] [error] [client c_ip] PythonHandler session: File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch\n result = object(req), referer: http://server/ [Wed Jan 10 17:12:23 2007] [error] [client c_ip] PythonHandler session: File "/var/www/session.py", line 50, in handler\n cur.execute("UPDATE users SET in_use=1, name=\\"%s\\", started=\\"%s\\" WHERE id=%d" % \\, referer: http://server/ [Wed Jan 10 17:12:23 2007] [error] [client c_ip] PythonHandler session: File "/usr/lib/python2.4/site-packages/sqlite/main.py", line 237, in execute\n self.con._begin(), referer: http://server/ [Wed Jan 10 17:12:23 2007] [error] [client c_ip] PythonHandler session: File "/usr/lib/python2.4/site-packages/sqlite/main.py", line 503, in _begin\n self.db.execute("BEGIN"), referer: http://server/ [Wed Jan 10 17:12:23 2007] [error] [client c_ip] PythonHandler session: DatabaseError: unable to open database file, referer: http://server/ Cheers, Richard -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Richard Lewis Sonic Arts Research Archive http://www.sara.uea.ac.uk/ JID: ironchicken at jabber.earth.li -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|