admin login fails on new database

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
accampbell
Regular
Posts: 138
Joined: Fri Jun 09, 2006 8:59 pm
Location: London, UK
Contact:

admin login fails on new database

Post by accampbell »

I've just changed my ISP and installed a copy of my database on the new server. I also installed the current issue of Serendipity. I can see the blog OK but I cannot log in to administer it; I am told the username or password is wrong. I deleted Serendipity and reinstalled it but the same thing happened. Any suggestions for what is wrong?
Anthony Campbell
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: admin login fails on new database

Post by Timbalu »

There might be different issues and solutions, but the easiest one is to try with the fixlogin script.
Please read this search list
http://board.s9y.org/search.php?keyword ... ch=300&t=0
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
accampbell
Regular
Posts: 138
Joined: Fri Jun 09, 2006 8:59 pm
Location: London, UK
Contact:

Re: admin login fails on new database

Post by accampbell »

I should really have posted this in Installation, but anyway, I am getting nowhere. I still can't log in to administer the blog. Fix.php seems to be for upgrades, but anyway I don't have it. Following an earlier post by Garvin I thought the problem might be that I had earlier made repeated installation attempts of Serendipity. so I deleted and ireimported the database (several times) and deleted serendipity_config_liocal.php and restarted. Still no joy: password and/or username are said to be incorrect.

Should I try with the previous version of Serendipity? I am completely at sea here - on the point of giving up.
Anthony Campbell
accampbell
Regular
Posts: 138
Joined: Fri Jun 09, 2006 8:59 pm
Location: London, UK
Contact:

Re: admin login fails on new database

Post by accampbell »

Sorry for replying to myself, but I just tried with an empty database and everything is fine - I can enter admin. But of course there is nothing in the blog. How can I now insert my database without messing everything up?
Anthony Campbell
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: admin login fails on new database

Post by Timbalu »

First: Do not give up! Englishmen are a sea-faring nation!

Well yes, you dont have these scripts, you have to create to use them!

Ok, its not an upgrade... Did you recieve any errors? What did you do by now, exactly?

Try this test.php
http://board.s9y.org/viewtopic.php?f=3& ... #p10424763
How can I now insert my database without messing everything up?
This is some copy and paste within phpmyadmin or your database dump ... but I would try to repair the old db first (see my answer), which seems easier for me.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
accampbell
Regular
Posts: 138
Joined: Fri Jun 09, 2006 8:59 pm
Location: London, UK
Contact:

Re: admin login fails on new database

Post by accampbell »

I get an error with test.php:
Warning: Invalid argument supplied for foreach() in /data01/c4909627/public_html/serendipity/test.php on line 8
done.

As to what I do, I just go through the usuall installation process, inserting a username and password as demanded. I tried with a different browser - no help.
Anthony Campbell
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: admin login fails on new database

Post by garvinhicking »

Hi!

When you MOVE an existing installation to a new server, you do NOT install it fresh! Instead, you just need to edit the serendipity_Config_local.inc.php file from your old installation ot contain the new database credentials on the new server.

Then it should pick up automatically.

When you re-install fresh, you actually re-install fresh, with a new username and not your old data of the account...thus, the blog entries would not be properly matched.

What you should do now is to start from scratch; copy over all of the files of your old server to the new one, copy all the old database tables to the new server, then edit serendipity_config_local.inc.php and it should work...

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/
accampbell
Regular
Posts: 138
Joined: Fri Jun 09, 2006 8:59 pm
Location: London, UK
Contact:

Re: admin login fails on new database

Post by accampbell »

garvinhicking wrote:Hi!



What you should do now is to start from scratch; copy over all of the files of your old server to the new one, copy all the old database tables to the new server, then edit serendipity_config_local.inc.php and it should work...

Regards,
Garvin
I thought I'd done that. I made a copy of the data stiuff on the old server, made a database on the new server, and imported the old database into that. I then obtained the latest version of Serendipity and uploaded it. When I logged I went throug the steps and the blog came up, but login to administer it always fails. What should I put in serendipity_config_local.inc.php?
Anthony Campbell
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: admin login fails on new database

Post by yellowled »

accampbell wrote:What should I put in serendipity_config_local.inc.php?
The credentials for the db server on your new server. Usually, you should only have to change dbName, dbUser and dbPass.

If you're using url rewriting, it often helps to turn that off and on again after the first login to make s9y rewrite the .htaccess.

YL
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: admin login fails on new database

Post by Timbalu »

Edit:
I was talking rubbish, time to have a walk...
Last edited by Timbalu on Tue Nov 15, 2011 3:56 pm, edited 1 time in total.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
accampbell
Regular
Posts: 138
Joined: Fri Jun 09, 2006 8:59 pm
Location: London, UK
Contact:

Re: admin login fails on new database

Post by accampbell »

yellowled wrote:
accampbell wrote:What should I put in serendipity_config_local.inc.php?
The credentials for the db server on your new server. Usually, you should only have to change dbName, dbUser and dbPass.

If you're using url rewriting, it often helps to turn that off and on again after the first login to make s9y rewrite the .htaccess.

YL
OK, that file is correct, which is why I can see the database.

I don't know what you mean by url rewriting - can you explain please?

As far as I can see the problem is that serendipity is not changing the password or user entry in the populated database. There is a difference between the entry in that database and the one in the blank database, which I can adminiister.

I'm beginning to think the onl;y solution is to have two versions of serendipity, one for the populated database, one for the new one, and put a link between them. That would not be very satisfactory, though.
Anthony Campbell
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: admin login fails on new database

Post by yellowled »

Timbalu wrote:Do not change the User or Password, else you can't log in to your old and copied database.
I highly doubt you'll find a webhoster which uses the same db user and password as another one.

I actually did this last night, mirroring my blog to localhost:

blog: dbname_a, dbuser_a, dbpass_a
local: dbname_b, dbuser_b, dbpass_b

Workflow: create an empty db on local, export db on blog, import it on local. Said imported db is using db*_b values, so of course you have to change them in serendipity_config_local.inc.php.

Or am I misunderstanding this altoghther?

YL
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: admin login fails on new database

Post by yellowled »

accampbell wrote:I don't know what you mean by url rewriting - can you explain please?
If you don't know that it is, you're probably not using it. :) url rewriting uses the Apache webserver's module mod_rewrite to produce search engine friendly, human readable urls. Your blog's urls probably have a fragment like "index.php?" etc. in some urls. Simply put, url rewriting gets rid of those.

YL
Eni
Regular
Posts: 62
Joined: Thu Jan 27, 2005 10:47 pm
Location: Münster, Germany

Re: admin login fails on new database

Post by Eni »

I think, if I understand Anthony correct - he installed a fresh serendipity and copied the old db (from an older serendipity version) into it.

I'm not an expert but isn't the better way to either upgrade serendipity before or after the move? This oneversionintotheother sounds a bit messy to me and may is the cause for the problems? :?

~eni
Sorry, I'm Late. But I Got Lost On The Road Of Life.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: admin login fails on new database

Post by Timbalu »

accampbell wrote:As far as I can see the problem is that serendipity is not changing the password or user entry in the populated database. There is a difference between the entry in that database and the one in the blank database, which I can adminiister.
I think you really should start from cratch, as Garvin suggested.
What do you mean by this quoted entry?
Who should or Why should these entries be modified, by whom and how?
YellowLed wrote:Or am I misunderstanding this altoghther?
No just me, as answering to something obvious rubbish :wink:

Anthony, as Eni says... go step by step
1. make the old database and old serendipity work on your new server
2. then upgrade serendipty
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply