problem with mcrypt installation

后端 未结 6 1060
不思量自难忘°
不思量自难忘° 2021-02-19 09:08

I\'ve asked the system admins to install mcrypt on the server, and they say everything is OK. But when I run my simple script I get this.

Warning

6条回答
  •  有刺的猬
    2021-02-19 09:54

    I had exactly the same problem.

    > mcrypt -v
    Mcrypt v.0.9.9 (sparc-sun-solaris2.10)
    Linked against libmcrypt v.2.5.8
    
    > mcrypt --list-hash
    Supported Hash Algorithms:
    crc32
    md5
    sha1
    haval256
    ripemd160
    tiger
    gost
    [...]
    
    > php CryptoTest.php
    PHP Warning:  mcrypt_list_modes(): No modes found in module dir in [...]
    

    It was solved by reconfiguring and recompiling libmcrypt with these options:

    ./configure --prefix=$YOUR_PATH/libmcrypt --enable-dynamic-loading --disable-posix-threads
    

    Then in your php.ini :

    mcrypt.algorithms_dir=/libmcrypt/lib/libmcrypt
    mcrypt.modes_dir=/libmcrypt/lib/libmcrypt
    

提交回复
热议问题