When I move my Drupal7-Website (with SQLite Database) from my XAMP to another Computer also running XAMP I got the following error message.

Uncaught exception thrown in shutdown function.

PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database: DELETE FROM {semaphore} WHERE (value = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 192200923514edf6a15a484.46864520 ) in lock_release_all() (line 269 of /Applications/XAMPP/xamppfiles/htdocs/myd7site/includes/lock.inc).

How comes? And how to fix? Thnx!


2 Answers 2


It seems that the PDO SQLite driver requires that if you are going to do a write operation (INSERT,UPDATE,DELETE,DROP, etc), then the folder the database resides in must have write permissions, as well as the actual database file.

The above information is taken from another answer: https://stackoverflow.com/a/3330616/2171489

I don't use SQLite, but given the error from the PDO driver and the fact that you moved to a different server, it does seem like it could be a file permission problem.

  • Welcome to Drupal Answers! Whilst this link may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – Mołot
    Aug 21, 2014 at 14:22
  1. Go to database bin folder in xamp (xampp\mysql\bin)
  2. Open my.ini
  3. Change value of "max_allowed_packet" to "256m" (or larger)
  4. Save my.ini Now restart MySql through the XAMPP control panel.
  • Thanx. But as I mentioned in the Question I don't use mySQL. I use SQLite. So no mySQL-Server is running.
    – headkit
    Mar 25, 2013 at 8:27
  • (xampp\mysql\bin) written as example. "Go to database bin folder in xamp". find your using db server's .ini and change value
    – monymirza
    Mar 25, 2013 at 8:30
  • sorry, can't find any sqlite database bin folder.
    – headkit
    Mar 27, 2013 at 9:24
  • solution is that, u need to increase max_allowed_packet value. find it and do.
    – monymirza
    Mar 27, 2013 at 9:47
  • yes, shure I understand that. but I don't find this string for sqlite. I only find this string for mysql-solution.
    – headkit
    Mar 27, 2013 at 11:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.