I have a PHP application written using the Codeigniter framework. When I am trying to run this application on Windows Machine then I am getting below error:
An Error Was Encountered
The Encrypt library requires the Mcrypt extension.
This same application working fine on some random Windows Machine having the same configuration. I have tried on 5 different windows 10 machines and got this error on 3 Machine and worked fine on 2 machines. Here I have used the same installer to install XAMPP on all the machines and the same code, but still don't know how to make it run smoothly. I have tried almost all the suggestions available online like to make a change in php.ini but no luck so far.
(FOR CI USERS only) If you are switched from CI2 XAMPP(php5) to XAMPP(php7) then, paste encrypt.php in CI->system->libraries folder, after this it should be fine !
For the future comers, I have face this problem too. It is usually issue with php 7.2.
Simply replace encrypt
with encryption
in autoload.php
$autoload['libraries'] = array('database', 'email', 'session', 'encrypt', 'pagination');
$autoload['libraries'] = array('database', 'email', 'session', '**encryption**', 'pagination');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With