Use of undefined constant MCRYPT_RIJNDAEL_128

Are you getting the following error after running ‘php artisan serve’?

Use of undefined constant MCRYPT_RIJNDAEL_128 – assumed ‘MCRYPT_RIJNDAEL_128′

If so, you probably need to run the following commands:

sudo apt-get install php-mcrypt mcrypt
sudo php5enmod mcrypt

Now restart php artisan serve and hopefully the problem will have gone away. Note that it isn’t enough just to install mcrypt. You need to run the second command to register it.

Laravel should now work ok.


你可能感兴趣的:(ubuntu,laravel)