Use of undefined constant MCRYPT_RIJNDAEL_128 - as

2019-01-25 13:24发布

I have successfully installed Laravel, but after running php artisan serve and going to localhost:8000 I get this error:

Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128'

I have checked phpinfo() on localhost:8888 and it says that mcrypt is properly installed. However the only thing I can think of is that maybe my path is wrong?

in my .bash_profile I have

PATH=/usr/local/bin:$PATH

Every time I try to run Laravel commands I have to type this in the terminal:

export PATH="~/.composer/vendor/bin:$PATH" 

I am running on a Mac. Is there a simple way I can set up my bash_profile so that I can consistently change between localhost addresses and still have all the proper PHP functions working?

7条回答
地球回转人心会变
2楼-- · 2019-01-25 14:05

I use nginx and php-fpm, and already did apt-get install php5-mcrypt, and moved the mcrypt.ini file to mods-available.

I had to do sudo service php5-fpm restart before it actually worked.

查看更多
登录 后发表回答