Thanks a lot Jeff. I figured out the problem which was a bit more complicated than that but basically was also what you said.
I downloaded the sqlite3 client and that helped too. What throw me off (among other things) is that in Linux you only need executable permissions to a directory and write permissions to a file to modify it and for apache/sqlite3 you also need write permissions to the directory, not sure why and especially since the other files (owned by root, in the same directory) are accessed by apache without problems and no temporary files etc are created. Also the examples and solutions from people in the web where they gave all kinds of permissions to the main code directory (where the database file was) and file didn't make sense to me from a security standpoint; I think a better solution is to put the sqlite file in a separate directory (just for that file), that way we don't have to lower the security of the rest of the project. Regards On Feb 10, 3:12 pm, Jeff FW <jeff...@gmail.com> wrote: > 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 -~----------~----~----~----~------~----~------~--~---