mcrypt

Discussion in 'Installation/Configuration' started by sojic, May 14, 2008.

  1. sojic

    sojic New Member

    I'm trying to install Magneto E-Commerce, but it require mcrypt. It say:

    I install mcrypt, try to enable it

    /etc/php.ini
    Code:
    extension=mcrypt.so
    
    or create in /etc/php.d/mcrypt.ini
    extension=mcrypt.so

    Restart apache, but still Magneto instalation say "PHP Extension "mcrypt" must be loaded"
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Which distribution are you using?
     
  3. sojic

    sojic New Member

    Centos 5.0
     
  4. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    yum search mcrypt
    ? Is there a php-mcrypt package?
     
  5. sojic

    sojic New Member

    [root@web1 ~]# yum search mcrypt
    Loading "installonlyn" plugin
    Setting up repositories
    epel 100% |=========================| 1.1 kB 00:00
    updates 100% |=========================| 951 B 00:00
    base 100% |=========================| 1.1 kB 00:00
    addons 100% |=========================| 951 B 00:00
    extras 100% |=========================| 1.1 kB 00:00
    Reading repository metadata in from local files



    libmcrypt.x86_64 2.5.7-5.el5 epel
    Matched from:
    libmcrypt
    Libmcrypt is a thread-safe library providing a uniform interface
    to access several block and stream encryption algorithms.
    http://mcrypt.sourceforge.net/



    libmcrypt-devel.x86_64 2.5.7-5.el5 epel
    Matched from:
    libmcrypt-devel
    Development libraries and headers for libmcrypt
    Development libraries and headers for use in building applications that
    use libmcrypt.
    http://mcrypt.sourceforge.net/



    libmcrypt.i386 2.5.7-5.el5 epel
    Matched from:
    libmcrypt
    Libmcrypt is a thread-safe library providing a uniform interface
    to access several block and stream encryption algorithms.
    http://mcrypt.sourceforge.net/



    libmcrypt-devel.i386 2.5.7-5.el5 epel
    Matched from:
    libmcrypt-devel
    Development libraries and headers for libmcrypt
    Development libraries and headers for use in building applications that
    use libmcrypt.
    http://mcrypt.sourceforge.net/



    mcrypt.x86_64 2.6.4-3.el5 epel
    Matched from:
    mcrypt
    MCrypt is a replacement for the old crypt() package and crypt(1) command,
    with extensions. It allows developers to use a wide range of encryption
    functions, without making drastic changes to their code. It allows users
    to encrypt files or data streams without having to be cryptographers.
    http://mcrypt.sourceforge.net/



    php-mcrypt.x86_64 5.1.6-4.el5 epel
    Matched from:
    php-mcrypt
    Standard PHP module provides mcrypt library support
    Standard PHP module provides mcrypt library support



    php-pear-Crypt-CHAP.noarch 1.0.1-1.el5.1 epel
    Matched from:
    This package provides Classes for generating CHAP packets. Currently these
    types of CHAP are supported: CHAP-MD5, MS-CHAPv1, MS-CHAPv2. For MS-CHAP the
    mhash and mcrypt extensions must be loaded.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Pleasse run:

    yum install php-mcrypt

    to make sure that the php module is installed.

    Then create a info.php file with the following content:

    <?php
    phpinfo();
    ?>

    in the website and call it in the browser. Is mcrypt listed in the output as loaded extension?
     
  7. sojic

    sojic New Member

  8. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/php.d/mcrypt.ini?
     
  9. sojic

    sojic New Member

    [root@web1 ~]# cat /etc/php.d/mcrypt.ini
    ; Enable mcrypt extension module
    extension=mcrypt.so
    [root@web1 ~]#
     
  10. falko

    falko Super Moderator Howtoforge Staff

    Looks ok. Did you restart Apache?
     
  11. sojic

    sojic New Member

    Yes, several times.
     
  12. falko

    falko Super Moderator Howtoforge Staff

    Any errors in Apache's error log?
    What's the output of
    Code:
    updatedb
    locate mcrypt.so
     
  13. sojic

    sojic New Member

    I will analize apache error log later.

    updatedb do not show any error
    Code:
    [root@web1 ~]# updatedb
    [root@web1 ~]# locate mcrypt.so
    /usr/lib64/libmcrypt.so.4
    /usr/lib64/libmcrypt.so.4.4.8
    /usr/lib64/php/modules/mcrypt.so
    [root@web1 ~]#
    
     
  14. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ls -la /usr/lib64/php/modules
    ? Is there also a directory /usr/lib/php/modules?
     
  15. bakermonk

    bakermonk New Member

    Have the same problem on CentOS 5 and php 5.2.6
    mcrypt and domxml is installed, but don't load
     
  16. falko

    falko Super Moderator Howtoforge Staff

    Are they enabled in your php.ini?
     
  17. flaviusro

    flaviusro New Member

    well .. same problem here

    Hello Falko,

    Same environment here .. and same problem.
    Centos 5.0 .

    [root@tomcat ispconfig]# php -v
    PHP Warning: PHP Startup: mcrypt: Unable to initialize module
    Module compiled with module API=20050922, debug=0, thread-safety=0
    PHP compiled with module API=20060613, debug=0, thread-safety=0
    These options need to match
    in Unknown on line 0
    PHP Warning: PHP Startup: mhash: Unable to initialize module
    Module compiled with module API=20050922, debug=0, thread-safety=0
    PHP compiled with module API=20060613, debug=0, thread-safety=0
    These options need to match
    in Unknown on line 0

    PHP 5.2.6 (cli) (built: May 7 2008 00:50:43)
    Copyright (c) 1997-2008 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
     
  18. falko

    falko Super Moderator Howtoforge Staff

    Did you run
    Code:
    yum install php-mcrypt
    ?
     
  19. flaviusro

    flaviusro New Member

    solved

    hello, solved it my deinstalling mcrypt (installed by yum) and installed manually a newer version (from pbone)
     

Share This Page