Welcome Guest, Not a member yet? Register   Sign In
change of hosts
#1

[eluser]adi003[/eluser]
Hello. I have a small problem:
Someone wrote a application for me using codeiginiter. when i moved the app to another host i modified the config files and i imported the database but now i cant login, it says user and password wrong. on the original host its working well. i checked the database and the users and passwords were there. what can i do?
#2

[eluser]jedd[/eluser]
[quote author="adi003" date="1246129542"]Hello. I have a small problem:
Someone wrote a application for me using codeiginiter. when i moved the app to another host i modified the config files and i imported the database but now i cant login, it says user and password wrong. on the original host its working well. i checked the database and the users and passwords were there. what can i do?[/quote]

Hi adi003 and welcome to the forums.

You're in for some Fun, that's for sure.

Is the database on the same box as the web server?

Were there any stored procedures in use with this application (most people forget they have to copy those across separately). Actually this is a MySQL problem. What database and PHP and web server and OS and CI core versions are you using?

You may have some version incompatibilities - particularly if you moved from MySQL 4 to 5 (or vice versa) or PHP 4 to 5 (or vice versa). I'd check previous and current versions of all these things.

Can you login to the database using the same credentials as your application is using (database.php) but using the database's command line tools from the same host that your web application is running?
#3

[eluser]adi003[/eluser]
copy-paste information

old host:
Server Information
Operating system Linux
Apache version 2.2.11 (Unix)
PHP version 5.2.9
MySQL version 5.0.81

new host
Server Information
Operating system Linux
Apache version 2.2.11 (Unix)
PHP version 5.2.9
MySQL version 5.0.81-community
#4

[eluser]adi003[/eluser]
no one can answer my problem. is this a bug or a feature? :X
#5

[eluser]FutureKing[/eluser]
$mysql = check database connection details in config files;
if ($mysql==true){
open_in_phpmyadmin("your database");
}else{
correct them;
}

function open_in_phpmyadmin($database){
$check = check everything is imported perfectly or not
if($check==true){
//check your application logic
}else{
copy all username and passwords in new database( I mean import everything perfectly )
}
}
#6

[eluser]FutureKing[/eluser]
I am agree with jedd
....
Were there any stored procedures in use with this application (most people forget they have to copy those across separately). Actually this is a MySQL problem.
....
#7

[eluser]jedd[/eluser]
[quote author="adi003" date="1246187971"]no one can answer my problem. is this a bug or a feature? :X[/quote]

adi003 - you answered one of my questions, hinted at the other, and failed to answer the most important of the three that I asked.
#8

[eluser]adi003[/eluser]
ok. here how it goes
1. moved all the files from the old host to the new host
2. created a new database and imported a a fresh copy of the database with 0 records
3. created a new admin account using the application
4. imported all the records from the old database without the user records
5. added manually the old users

don't know why it had to be that way? maybe because the users passwords were encrypted?
thanks anyway for the support (FutureKing and jedd)
ps jedd i read the question 30 times before i understood what you were talking about
#9

[eluser]jedd[/eluser]
Oh, there's a thought .. perhaps the passwords were hashed with something local to the environment? You'd have to look through the code to check this - the authentication bit that happens after the password is provided at the login form.

It'd be handy to know this now, so you can start to code around it, iff you intend to ever relocate the system again.

(I think this would explain the symptoms you described, as well as the solution you ended up using.)
#10

[eluser]adi003[/eluser]
well... maybe another noob will have something to learn from all this




Theme © iAndrew 2016 - Forum software by © MyBB