mCrypt not present after Ubuntu upgrade to 13.10

后端 未结 10 1098
难免孤独
难免孤独 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: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!

提交回复
热议问题