I have a login and sign up form and use the encrypt library to encrypt the password.. I am using Xampp for my server and my system works correctly..
code to encrypt
Sounds like you need to update your php version.
http://php.net/manual/en/mcrypt.requirements.php