Anybody have any idea how to do this? I get the following error on the site every time I try to replace the .ht.sqlite file

ncaught exception thrown in shutdown function.

PDOException: SQLSTATE[HY000]: General error: 11 database disk image is malformed: DELETE FROM {semaphore} WHERE (value = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 10325233614d3b05b1f3f749.85264221 ) in lock_release_all() (line 247 of /home/phishead/public_html/ppp/includes/lock.inc).

Comments

phishyman2’s picture

I have searched everywhere on the Internet and it seems that I am the first person on this earth to ever try to restore a SQlite database for a Drupal 7 site, or at least the first person who can't do it.

kripsio’s picture

I've the same problem, can't migrate a site from a server to another.
May I try something?

JimVaru’s picture

I think is all about ownership..

I was trying to move my TESTsite from http://lab3teilamias.24.eu to my Wampp Server (localhost).
I disable Clean URLs. I make site in maintenance mode. Save

With FTP i was copy all my site files to desktop folder "lab3"
exit FTP and log into local ftp server

With FTP i copy "lab3" into "/opt/lampp/htdocs" and exit filezilla.
I open a terminal and i go into /opt/lamp/htdocs

>sudo chown -R nobody:nogroup lab3

I open FTP and i restore all folder ownership to 755
and all files to 644

With firefox i look into http://localhost/lab3 and voila my site!!!
Then i restore in filesystem temporary dir into /var/tmp and save
And i set clean urls Active..

notes: when all over u must change the ownership of /sites/default/setting.php to 400
notes: if u cant sent via FTP your site folder into /opt/lampp/htdocs make a dir (you must be root user)
and change own to nobody and file permission to 777 (chmod)
(sry for my bad english)....

ricardobabe’s picture

Thanks so much, it work for me after re-uploading the content and Sqlite file.
Chmod on the web and the Sqlite DB as mentioned in your post.

chi’s picture

In Filezilla go to menu Transfer and set transfer type from auto to binary then upload your sqlite database.
It worked for me.

________________________
Override, don't change!

saitanay’s picture

thank you Chi. this worked for me. Never used sqlite earlier. had to move a site and setting transfer type to binary for the sqlite file did the trick.

DrupalChimp’s picture

Great tip. Thanks

Mich’s picture

I'm getting the same problem. Anyone? I'm searching for a long time now and I can't find any solution.

Error
The website encountered an unexpected error. Please try again later.

Error message
PDOException: SQLSTATE[HY000] [14] unable to open database file in lock_may_be_available() (line 167 of /home/a8895571/public_html/includes/lock.inc).

I have set all the permission rights to 777 and edited the settings.php to locate the right SQlite file. Also tried to transfer binary.

Panteraa’s picture

I've the same error if I try to make login:

PDOException: SQLSTATE[HY000]: General error: 11 database disk image is malformed: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?); Array ( [0] => 1 [1] => user [2] => Session opened for %name. [3] => a:1:{s:5:"%name";s:7:"Remotecontrol";} [4] => 5 [5] => [6] => http://www.manualinux.com/drupal/?q=user [7] => http://www.manualinux.com/drupal/?q=user [8] => 79.35.20.46 [9] => 1342478853 ) in dblog_watchdog() (line 154 of /web/htdocs/www.manualinux.com/home/drupal/modules/dblog/dblog.module).

Any idea ??

little flower from the mountains’s picture

I just experienced this issue. I worked around by downloading the database, backing it up, using sqliteman to export the database to sql and recreate it from the sql... Sqliteman did report that the database was misformed but worked its way fine to export it. Then upload it up again and set the permissions (I use 770, is that allright?).

Now my website complains that errors have happened (its quite what happened!) but seems to be recovering.

Daniel

EDIT: when the site starts running again, flush all caches or else some nodes will appear without content. My site is now back to a working state. Will see how long before it blows up again.

ricardobabe’s picture

Thanks so much, it work for me after re-uploading the content and Sqlite file.
Chmod on the web and the Sqlite DB as mentioned in your post.