I have to encrypt url parameter in codeigniter. So that i have to include "encrypt" library but When I load library -$this->load->library('encrypt'); it shows following error- The Encrypt library requires the Mcrypt extension. What I do now? Thanks.
Asked
Active
Viewed 763 times
1
-
Windows or LInux ??? – Bira Sep 26 '16 at 06:09
-
http://stackoverflow.com/questions/4486055/codeigniter-encryption-on-production-server-and-local-server – Bira Sep 26 '16 at 06:10
-
http://stackoverflow.com/questions/35798048/php-error-the-encrypt-library-requires-the-mcrypt-extension-in-codeigniter – Bira Sep 26 '16 at 06:10
1 Answers
2
You need to install sudo apt-get install php5-mcrypt
if it is wamp enable the php configs and able to see it in the out put of phpinfo()
extension=mcrypt.so
Restart the apache after your changes

Bira
- 4,531
- 2
- 27
- 42
-
-
Yeah I set the encryption key in config but still I am getting that error. – amM Sep 26 '16 at 06:30
-
can you please put a test page and print the results of phpinfo() and find the mcrypt info. – Bira Sep 26 '16 at 07:04
-
I am getting error on localhost but it is working fine on server. Thanks Bira for your help. – amM Sep 26 '16 at 08:59
-
can you help me to decrypt url parameter on another page and how to access it. I have done to encrypt as - $this->email->message("Click here to unsubscribe");. I want to decrypt sub_id on another page. – amM Sep 26 '16 at 09:15