php and mcrypt
Dear friends,
I have Redhat 7.2 installed with apache and php installed by default. but I am getting the following error in a php file when viewed in browser at the client end. ======================= // source code of php file <?php $key = "this is a very secret key"; $input = "Let us meet at 9 o'clock at the secret place."; $encrypted_data = mcrypt_ecb (MCRYPT_3DES, $key, $input, MCRYPT_ENCRYPT); ?> ======================= ======================= Error message at the client ======================= Fatal error: Call to undefined function: mcrypt_ecb() in /home/httpd/html/test.php on line 4 --------------------------------------------------------------------------- Can any one help me in this regards Mayank |
Here's my random stab:
1) The libmcrypt library is not installed on your system. Look through your rpms on your cds before getting something off the web. ("locate libmcrypt" to see if it's installed.) 2) php was not linked with libmcrypt. I think is is, but... You'd have to install the srpm, modify the /usr/src/redhat/SPECS/php.spec file and then do a rpm -ba php.spec to get an rpm which is linked. 3) if you're messing with system passwords, you probably want to be using the crypt function instead. |
I would guess that is is #2. To check you can use phpinfo(). Do you have an mcrypt section?
--jeremy |
Thanks
It was #2 only and now i have solved the problem as was told
Thanks :D Mayank |
All times are GMT -5. The time now is 09:13 AM. |