Page 1 of 1

Strange login problem...[resolved]

Posted: Wed Aug 17, 2011 1:24 pm
by MaraXus
Ok, so I copied EVERYTHING (including the database) off of the download at mediafire, and I am still having a problem where it converts the password into a 32 char string, but it doesn't change it back? First of all, what should I post as far as code, and second, anyone else had this problem?
Thanks!

Re: Strange login problem...

Posted: Wed Aug 17, 2011 1:51 pm
by Xaleph
It`s an MD5 hash I suppose. You can`t change it back, it`s a hash. The whole reason to hash passwords is so they won`t show up in your database as plain text.

When you check the password on login, you hash the password, and check the hashed version against the hash in the database, that`s how a log in works.

Re: Strange login problem...

Posted: Wed Aug 17, 2011 5:03 pm
by MaraXus
So then what could be wrong? I suppose I could just take the hashing off, but I don't understand what could be going wrong, other than it doesn't change it to hash when you try to login...

Re: Strange login problem...

Posted: Wed Aug 17, 2011 6:02 pm
by Xaleph
On your login page, is there a md5() on the $password variable? If so, then hashing is not the problem. Try running some debug options, check to see where it goes wrong, if PHP throws an error somewhere. If not, try echoing out where the script is coming, where it branches et cetera. Debugging PHP sucks, I know, but you`ll get used to it after a while.

Re: Strange login problem...

Posted: Wed Aug 17, 2011 6:44 pm
by MaraXus
Ok, I actually figured it out, but I actually forgot what it was, since I had to leave as soon as I fixed it. It works now, though! I am currently adding color to all of the stats.