mCrypt not present after Ubuntu upgrade to 13.10

后端 未结 10 982
难免孤独
难免孤独 2020-12-04 06:50

After I have upgraded my system from Ubuntu 13.04 to 13.10 several problems have occurred with apache, mysql and php configurations.

I solved most of them but I can

相关标签:
10条回答
  • 2020-12-04 07:06

    Another solution if the package is already installed:

    sudo aptitude reinstall php5-mycript
    

    This worked for me after doing upgrade

    0 讨论(0)
  • 2020-12-04 07:07

    I had this problem with Ubuntu 14.04 and I did the following to resolve it:

    sudo apt-get install php5-mcrypt
    sudo php5enmod mcrypt
    
    sudo service apache2 restart
    
    0 讨论(0)
  • 2020-12-04 07:09

    From Ubuntu 13.10 to 14.04:

    sudo php5enmod mcrypt
    sudo service apache2 restart
    

    Works for me.

    0 讨论(0)
  • 2020-12-04 07:12

    I had the same problem with PHP 5.5.14 running on Mac OS X Yosemite. I was trying to install Laravel 5.0. And when I tried to create a new project I got an error like below (even when I tried to start the laravel server with php artisan serve

    Alejandros-MacBook-Pro:Documents Lexynux$ laravel new blog
    Crafting application...
    PHP Notice:  Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' in /Library/WebServer/Documents/blog/config/app.php on line 83
    PHP Notice:  Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' in /Library/WebServer/Documents/blog/config/app.php on line 83
    Generating optimized class loader
    Compiling common classes
    Compiling views
    PHP Notice:  Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' in /Library/WebServer/Documents/blog/config/app.php on line 83
    Application key [CCOPocoMjnJTx4AFXk64wqyTKyo3BlHq] set successfully.
    Application ready! Build something amazing.
    Alejandros-MacBook-Pro:Documents Lexynux$ 
    

    So I just added the line below at the end of my php.ini file with the nano editor:

    extension=mcrypt.so
    sudo nano /etc/php.ini
    

    Finally just restart the Terminal and restart the laravel app server with

    php artisan serve
    

    And it works fine!

    0 讨论(0)
  • 2020-12-04 07:17

    Try this code:

    ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/apache2/conf.d/20-mcrypt.ini
    service apache2 restart
    
    0 讨论(0)
  • 2020-12-04 07:18

    just found on php.net

    Note, for Ubuntu, simply installing php5-mcrypt did not get mcrypt to work. You need to execute the following commands as root to enable it:

    apt-get install php5-mcrypt
    mv -i /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/
    php5enmod mcrypt
    service apache2 restart
    

    http://php.net/manual/en/mcrypt.installation.php#114609

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