Call to undefined function mcrypt_decrypt() - even when php5-mcrypt installed

后端 未结 2 1672
Happy的楠姐
Happy的楠姐 2021-02-05 17:55

So I can\'t stop getting the error:

PHP Fatal error:  Call to undefined function mcrypt_decrypt() in 

Even when I have php5_mcrypt installed, I

相关标签:
2条回答
  • 2021-02-05 18:35

    You may have to enable the module. On Ubuntu systems this can most easily be done by linking the ini file that ships with php5-mcrypt into your conf.d for each PHP binary you want to use:

    sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/cli/conf.d/mcrypt.ini
    sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/cgi/conf.d/mcrypt.ini
    
    0 讨论(0)
  • 2021-02-05 18:48

    Installing is one thing. Enabling is another. Please make sure your /etc/php.ini file contains the following line :

    extension=mcrypt.so
    

    If you can't find your php.ini, create a test.php file containing :

    <?php phpinfo(); ?>
    

    Execute it with php test.php | grep ".ini", and you'll find the paths to your ini files. One of them must include the extension= line above.

    0 讨论(0)
提交回复
热议问题