Laravel requires the Mcrypt PHP extension

后端 未结 22 2083
生来不讨喜
生来不讨喜 2020-11-22 07:59

I am trying to use the migrate function in Laravel 4 on OSX. However, I am getting the following error:

Laravel requir         


        
22条回答
  •  攒了一身酷
    2020-11-22 08:32

    Getting Laravel working on Apache

    PHP version : PHP 5.5.9

    Ubuntu version : 14.04

    i had a working laravel project on windows. when i copied it to ubuntu server , i started getting the mcrypt error. this after a lot of hours of trial and error

    getting artisan command working

    (if you are having mcrypt error while using artisan command line tool)

    i did a lot of trial and error so each time i run the php5enmod command before, i had error messages. but on fresh install there was no error messages. after this step i got artisan command working

    sudo rm /etc/php5/mods-available/mcrypt.ini
    sudo apt-get purge php5-mcrypt
    sudo apt-get install mcrypt
    sudo apt-get install php5-mcrypt
    sudo php5enmod mcrypt
    

    fixing the browser error

    (if you are having mcrypt error in browser when accessing local laravel index page)

    sudo nano /etc/php5/apache2/php.ini
    

    add the following line under the dynamically compiled extensions section of php ini

    extension=mcrypt.so
    

    restart the apache server , purge the laravel cache and everything working

提交回复
热议问题