techdude Posted April 5, 2011 Share Posted April 5, 2011 Hi! I use the SHA2 function in a mysql query. the query work OK on my own machine, but when I upload it to the server, It doesn't work. I logged into my server via SSH, and entered mysql, typing the following at the prompt. mysql > SELECT SHA2("blahblah",512) as loopy; It works on my developer's machine. On my server it says that SHA2 is not defined. What do I need to to to enable SHA2? Thanks for any help -- techdude Quote Link to comment https://forums.phpfreaks.com/topic/232811-using-sha2-in-mysql-fails-not-defined/ Share on other sites More sharing options...
PFMaBiSmAd Posted April 5, 2011 Share Posted April 5, 2011 From the mysql documentation for what you are trying to do - SHA2() was added in MySQL 5.5.5. Quote Link to comment https://forums.phpfreaks.com/topic/232811-using-sha2-in-mysql-fails-not-defined/#findComment-1197482 Share on other sites More sharing options...
techdude Posted April 5, 2011 Author Share Posted April 5, 2011 Doh! I should have checked that first. Looks like my host is using an out of date version of mysql (5.0.x) thnx. -- techdude Quote Link to comment https://forums.phpfreaks.com/topic/232811-using-sha2-in-mysql-fails-not-defined/#findComment-1197483 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.