1

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.

amM
  • 509
  • 2
  • 14
  • 33

1 Answers1

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
  • DId you set the encryption key in the config ? – Bira Sep 26 '16 at 06:25
  • 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