Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Mcrypt does not work on website  (Read 2650 times)

0 Members and 1 Guest are viewing this topic.

jominj

  • Guest
Mcrypt does not work on website
« on: January 29, 2014, 07:20:38 am »
'mcrypt' module functions does not work on website.

1. when we check for the package it shows as Installed
Code: [Select]
[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:
Code: [Select]
[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:
Code: [Select]
[root@ppa ~]# ln -s /usr/lib64/libltdl.so.7.2.1 /usr/lib64/libltdl.so.32. Make sure that mcrypt module was uploaded to PHP configuration:
Code: [Select]
[root@ppa ~]# php -m |grep mcrypt
mcrypt