My .htaccess was badly hacked, and so I had to reinstall; I am using sqlite db and so I still have the sqlite db file. So I thought with the new install; I would be able to just copy over the old db, and then put that in as the db to be used, and everything would automatically work.. instead, when I do that, I can't log in, nor does the blog come up. All it says is:
Powered by s9y – Template by Bulletproof development team.
What do i need to do, if I have a copy of the old sqlite db, to make it work with a fresh install?
Any help appreciated.
Thanks in advance.
Albert
New install, but using old sqlite db, doesn't work
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: New install, but using old sqlite db, doesn't work
Hi!
Ypu need to edit your serendipity_config_local.inc.php file and point $serendipity['dbName'] to the name of the old serendipity .db sqlite file instead of the freshly installed one?
HTH,
Garvin
Ypu need to edit your serendipity_config_local.inc.php file and point $serendipity['dbName'] to the name of the old serendipity .db sqlite file instead of the freshly installed one?
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: New install, but using old sqlite db, doesn't work
I did do that; but it still won't read it.. is there a reason why? I figure that's all I had to do, but it didn't work out that way.. Any other suggestions??
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: New install, but using old sqlite db, doesn't work
Are you sure editing the file worked properly? Usually the config_local.inc.php has speific write privileges; check if the tool you used to edit the file saved it.twoblink wrote:I did do that; but it still won't read it.. is there a reason why? I figure that's all I had to do, but it didn't work out that way.. Any other suggestions??
the only place where s9y draws the dbName from is from that file, so this is the single point you should need to change if you want to point s9y to a different SQLite file.
HTH,
GArvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: New install, but using old sqlite db, doesn't work
So I opened the old db locally; and it gave me an error; it seems that my old db was sqlite, not sqlite3..???
Was it because I was running a fairly old version of s9y?? I tried exporting all the data via sqldump and then importing it into the new database; no dice. Any other suggestions??
Was it because I was running a fairly old version of s9y?? I tried exporting all the data via sqldump and then importing it into the new database; no dice. Any other suggestions??
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: New install, but using old sqlite db, doesn't work
Hi!
Phew. Usually, SQLite should be backwards compatible, so an SQLite3 PHP module should be able to read SQLite2 tables.
It seems your new host might not have that backward compatibility enabled (even though I have little knowledge of this scenarios). This document: http://www.sqlite.org/version3.html describes how to migrate from an older version; did you try exactly that? What did happen in the process?
Regards,
Garvin
Phew. Usually, SQLite should be backwards compatible, so an SQLite3 PHP module should be able to read SQLite2 tables.
It seems your new host might not have that backward compatibility enabled (even though I have little knowledge of this scenarios). This document: http://www.sqlite.org/version3.html describes how to migrate from an older version; did you try exactly that? What did happen in the process?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: New install, but using old sqlite db, doesn't work
Did a
sqlite my.db .dump > mydb.sql
sqlite3 mynew.db < mydb.sql
It loaded into the db just fine; pointed serendipity_config_local to the new db.. still no dice
sqlite my.db .dump > mydb.sql
sqlite3 mynew.db < mydb.sql
It loaded into the db just fine; pointed serendipity_config_local to the new db.. still no dice
Re: New install, but using old sqlite db, doesn't work
I got it to work! So I found myself in a catch 22; the new install was actually in a different path than the old install; and so when I reverted back to the old DB, the path was incorrect, so it couldn't find it.. and so I used the admin screen to muck with the path FIRST; then changed the local config file; to point it to the correct one.. and that took care of it. Thanks for the help! Really appreciate it. This was a real nightmare..