Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I recently moved my website from one host to another. I moved all the files and also the database.

Now when I try to log in, it just refreshes the page and nothing happens.

The data is being read from the database but the site just doesn't log me in.

What extra information do I need to give?

share|improve this question
1  
If you post your code it might be easier to answer. –  Nicola Peluchetti Jun 13 '11 at 14:34
    
Do you have the same mySQL user credentials on this host as the previous? Do you have any PHP or mySQL errors? –  Ryan Jun 13 '11 at 14:34
    
I agree, post your code. Also, did you have a database setup on the original hosting? If so, did you set up the new hosting with the exact same database and configs, login credentials, etc... –  Drewdin Jun 13 '11 at 14:36
    
Without code it's not possible to answer. –  red eyes dev Jun 13 '11 at 14:36
    
Only reason I didn't include code was because I thought it might be a common thing. There are no errors at all, the files and database is exactly the same, and as I said, the database is reading fine meaning it's accessing no problem. What code would be relevant? I have a feeling it must be a directory problem. –  Luke Jun 13 '11 at 14:52
show 2 more comments

migrated from stackoverflow.com Jun 13 '11 at 15:23

This question came from our site for professional and enthusiast programmers.

closed as not a real question by RandomBen Jun 24 '11 at 1:37

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

Possible reasons:

  • The version of PHP or MySQL has changed and code that is either obsolete or dependent on a side effect of a function that has been fixed and no longer occurs is now broken or disabled

  • The login credentials for MySQL are different and your code does not output errors so the page just reloads.

  • You use Register Globals and the new server does not support it

Recommendations for troubleshooting:

  • Turn error reporting on and output all errors

  • Put in simple checks for errors at all stages of the login process to see where it is failing particularly where the SQL queries are performed

share|improve this answer
add comment