'mcrypt' module functions does not work on website.
1. when we check for the package it shows as Installed
[root@ppa~]# rpm -qa | grep mcrypt
libmcrypt-2.5.8-9.el6.x86_64
2. If you try to check version of PHP the following error appears:
[root@ppa~]# php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php-zts/modules/mcrypt.so' - libltdl.so.3: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.3.3 (cli) (built: Dec 11 2013 03:29:57)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube Ltd.
This issue is due to module libltdl.so.3 is missing on server:
[root@ppa ~]# ls -la /usr/lib64/libltdl*
lrwxrwxrwx 1 root root 16 Jan 9 21:54 /usr/lib64/libltdl.so -> libltdl.so.7.2.1
lrwxrwxrwx 1 root root 16 Apr 14 2013 /usr/lib64/libltdl.so.7 -> libltdl.so.7.2.1
-rwxr-xr-x 1 root root 39288 Aug 24 2010 /usr/lib64/libltdl.so.7.2.1
To solve this follow the steps below:
1. Create symlink libltdl.so.3 to the existing module libltdl.so.7.2.1:
[root@ppa ~]# ln -s /usr/lib64/libltdl.so.7.2.1 /usr/lib64/libltdl.so.3
2. Make sure that mcrypt module was uploaded to PHP configuration:
[root@ppa ~]# php -m |grep mcrypt
mcrypt