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
Solution works for me is
Before :
$autoload['libraries'] = array('database','session','upload','form_validation','encrypt','pagination');
After :
$autoload['libraries'] = array('database','session','upload','form_validation','pagination');
i just removed encrypt library from autoload libraries.
I was getting this error because i had switched from XAMPP(php5) to XAMPP(php7), for this I replaced my old CI->system->libraries->encrypt.php with new file here:encrypt.php, and it worked.
In this new file we check if mcrypt_encrypt is supported or not in __construct function with code below
$this->_mcrypt_exists = ( ! function_exists('mcrypt_encrypt')) ? FALSE : TRUE;
and based on that we use different function between mcrypt_encode and _xor_encode like that.
Just to know, if you see this old file in __construct function you will see actual error checking
if (($this->_mcrypt_exists = function_exists('mcrypt_encrypt')) === FALSE)
{
show_error('The Encrypt library requires the Mcrypt extension.');
}
It worked for me.
You should install the PHP mcrypt module;
sudo apt-get install php5-mcrypt
sudo php5enmod mcrypt
And normally you will be good ;)
Sounds like you need to update your php version.
http://php.net/manual/en/mcrypt.requirements.php