0

I have just moved my host to another machine but now a problem has occured. I get different mysql results from php. To be more spefecific, php returns the last result when i got back-up. I am checking database via mysql console but there are new entries. But php continues to return the old results. What do i need to do fix this?

P.S i can download php files which are on my new host. I can see the source code. Weird...

Thank you.

3
  • Did you correctly change the host in your php files? Commented Nov 19, 2010 at 21:25
  • mb check you app config...it could be using old db connection Commented Nov 19, 2010 at 21:26
  • you mean host? couldn't follow you there. Commented Nov 19, 2010 at 21:27

2 Answers 2

1
  1. Your php might still be connecting to the old database
  2. If you can download the php files, your server isn't set up to run PHP and/or has a mis-configured .htaccess file
Sign up to request clarification or add additional context in comments.

2 Comments

db's are ok. i am using 'localhost'. So there should be no problem.
Is your configuration panel under an IP or the hosts domain? It could be possible the domain hasn't been sent to the new server yet.
0

Check your database connection code.

It's possible that you're connecting to a remote host, rather than 'localhost':

$mysql_connection = mysql_connect('mysql.example.com', 'user', 'pass');

There is another possibility, different databases:

mysql_select_db('using_old_db', $mysql_connection);

1 Comment

I think problem lies within misconfigured php files. .htaccess files is okay. no problem with that. How can i configure php files on server?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.