Part of the EllisLab Network
   
 
change of hosts
Posted: 27 June 2009 09:05 AM   [ Ignore ]  
Summer Student
Total Posts:  7
Joined  05-06-2009

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?

Profile
 
 
Posted: 27 June 2009 10:02 AM   [ Ignore ]   [ # 1 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  2052
Joined  06-04-2008
adi003 - 27 June 2009 09:05 AM

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?

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?

Profile
 
 
Posted: 27 June 2009 10:55 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  7
Joined  05-06-2009

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

Profile
 
 
Posted: 28 June 2009 01:19 AM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  7
Joined  05-06-2009

no one can answer my problem. is this a bug or a feature? :X

Profile
 
 
Posted: 28 June 2009 02:54 AM   [ Ignore ]   [ # 4 ]  
Grad Student
Rank
Total Posts:  88
Joined  02-08-2009

$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 )
}
}

 Signature 

Learn CodeIgniter in Hindi

Profile
 
 
Posted: 28 June 2009 02:57 AM   [ Ignore ]   [ # 5 ]  
Grad Student
Rank
Total Posts:  88
Joined  02-08-2009

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.
....

 Signature 

Learn CodeIgniter in Hindi

Profile
 
 
Posted: 28 June 2009 04:15 AM   [ Ignore ]   [ # 6 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  2052
Joined  06-04-2008
adi003 - 28 June 2009 01:19 AM

no one can answer my problem. is this a bug or a feature? :X

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

Profile
 
 
Posted: 29 June 2009 05:55 AM   [ Ignore ]   [ # 7 ]  
Summer Student
Total Posts:  7
Joined  05-06-2009

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

Profile
 
 
Posted: 29 June 2009 07:30 AM   [ Ignore ]   [ # 8 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  2052
Joined  06-04-2008

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.)

Profile
 
 
Posted: 29 June 2009 07:50 AM   [ Ignore ]   [ # 9 ]  
Summer Student
Total Posts:  7
Joined  05-06-2009

well… maybe another noob will have something to learn from all this

Profile
 
 
Posted: 29 June 2009 09:46 AM   [ Ignore ]   [ # 10 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  242
Joined  02-06-2009

point the database config at the old db host to see if the problem is with the data or the code

 Signature 

Changing the world one line of code at a time

Profile
 
 
Posted: 04 July 2009 04:56 AM   [ Ignore ]   [ # 11 ]  
Summer Student
Total Posts:  7
Joined  05-06-2009

its a mysql bug/feature maybe codeigniter will develop a move/install application feature

Profile
 
 
Posted: 04 July 2009 07:01 AM   [ Ignore ]   [ # 12 ]  
Lab Assistant
RankRank
Total Posts:  119
Joined  03-19-2008

There is nothing wrong with CI. The problem is with your application and it apparently not being portable.

Can you locate the registration/login library and attach it to a post. They may use the host as the password salt..

In the meantime try this.

Register a new account on the website. Login to phpmyadmin, locate passsword info for new account. Copy and paste it to the admin account. Try logging in with admin account.

If this fails, contact previous developer and ask what is going on.

Profile
 
 
Posted: 04 July 2009 07:31 AM   [ Ignore ]   [ # 13 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  181
Joined  01-29-2008

Someone wrote a application for me using codeiginiter.

contact previous developer and ask what is going on.

This would have been a good first step!
doodle

 Signature 

Shameless example of self promotion

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 819, on March 11, 2010 11:15 AM
Total Registered Members: 120464 Total Logged-in Users: 38
Total Topics: 126542 Total Anonymous Users: 2
Total Replies: 665377 Total Guests: 311
Total Posts: 791919    
Members ( View Memberlist )