# Issue of log in on PHP site + MySQL



## arzoum (Jun 26, 2014)

Dear all,

Sorry, I have difficulty to set the subject regarding my issue. I have a web application (Apache + PHP + MySQL) running on FreeBSD 9.1-RELEASE. Before I could login on my administration page with accounts in MySQL database. After a system reboot, my appli application is back up and works, but now I cannot login with the same accounts in my MySQL database.

MySQL database has been repaired, but nothing, impossible to me to log again.

Have you an idea, please.  

Thanks


----------



## SirDice (Jun 26, 2014)

The issue is most likely with your database. Perhaps the way the passwords are stored? Did you check the database tables themselves?


----------



## arzoum (Jun 26, 2014)

Hi @SirDice,

Thank you. In my database, passwords are encrypted. Also I have created another account via the MySQL CLI, but I have the same issue with the new account. I have used `mysqlcheck` to repair my database because I had some warning when I checked but now all is ok when I check the database.

Please for your help.


----------



## SirDice (Jun 26, 2014)

I don't think your tables are corrupt, so repairing them isn't going to help. The issue is then somewhere in your application, specifically in how it compares the entered password on the site to the one that's stored in the database. Because you created the passwords by hand it's possible the application is using a different hashing algorithm than the one you used to create the password. In that case the passwords would never match. You may also need to take into account the _salt_ that's used to randomize the hash a little further. If the application uses a different salt than the one stored the passwords would never match too. 

But that all depends on the web application itself and without knowing how it's done it's hard to guess.


----------



## arzoum (Jun 26, 2014)

Thank you SirDice,

I'm checking and came back to you.


----------

