Had been dabbling with PHP and SQL lately working on a personal project, and decided to use Authentication. After searching in Google for some info, came across this link: http://www.php-mysql-tutorial.com/user-authentication/, which has some good examples of how authentication can be achieved in PHP.
I am using MySQL V5.something and the auth example using Database was not working, I was not getting authenticated even though I was using the right credentials.After further researching, I found that the ‘HASH’ created by MySQL’s PASSWORD() function was 31-bytes long in Version4.something of MySQL and in later versions the ‘HASH’ has been made more secure by being longer (41-bytes).Thanks to this wonderful article here. After wondering what went wrong (and I did get Lost, mostly bcoz I tend not to document and try to challenge my brain to figure out what is happening).Such are the nuances that one needs to be aware of while programming-kind of takes the joy of programming away from you for some time- and that is why I do not want to be programming for work but for personal pleasure, alone.
The pleasure one gets out of writing/debugging a code and then completing what he has been set to accomplish is enormous, but what could (for a person like me) be more satisfying is maybe reading a good book or watching a great movie or even having some time alone;this blended with a dash of coding purely for trying to bring one’s own ideas to life on the tiny little electronic device that we call Computer. Without doubt, that is where I would like to head.
Then again, it’s said “there’s only one thing you need to know to do ‘high work’: ‘Don’t get comfortable.’”
To hell with that statement!