You need to make sure that the user apache is running as (usually "apache") has write access to the database file *and* the directory that the database file is in.
The development server would work because *you* probably have write access to those paths. As for the sqlite3 version, run python, then: >>> import sqlite3 >>> sqlite3.version -Jeff On Feb 9, 12:10 pm, lazyant <startup.can...@gmail.com> wrote: > Hello, > > I installed yesterday Django 1.0.2 (current downloadable version) on a > new Ubuntu 8.10 machine with python 2.5.2. I wrote a toy application > and it works and shows fine with both the built-in development server > and Apache 2 (2.2.9). The database is sqlite3, it came with python > (btw, how do I get the sqlite3 version from python/the Linux command > line?). > > Anyways, yesterday everything was working fine, including the admin > application served by Apache. Today I only worked on templates, > restarting apache frequently (I know about setting MaxRequestsPerChild > 1 but anyways) but after a while I went to the admin application > (served by apache) and I got an error: "OperationalError: attempt to > write a readonly database", which is strange since it was working > before and I haven't made today any changes to file or directory > permissions or fiddled with the settings file. > > I looked up this error and I only see tips regarding permissions > problems, bad path in the setting file or perhaps a sqlite version > issue. I think none of that applies to me (since it was working > yesterday) but I double-checked just in case. > > I tried different things for troubleshooting, including dropping the > data with "manage.py sqlclear" and renaming the db file and re- > creating it with "manage.py reset" and "manage.py syncdb" (I suspected > perhaps the file was corrupted), but nothing I tried worked. I also > checked the server (it wasn't rebooted recently etc). > > Here's a twist: if I start the development server and I log in, then > the admin app in apache works fine (!), I can edit & save records etc. > As soon as I log out of the development server, then apache gives me > the readonly error. > > I'm ruling out client-side issues (cookies etc) since I tried with > different browsers and computers, deleting session and cookies etc. > > Any ideas? > > Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---