Error Laravel requires the Mcrypt PHP extension

0 votes

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

Laravel requires the Mcrypt PHP extension.

As far as I understand, it's already enabled.

What is wrong, and how can I fix it? 

Nov 11, 2020 in Laravel by kartik
• 37,510 points
968 views

1 answer to this question.

0 votes

Hello,

Use which php in the terminal to see which version of PHP you are using.

If it's not the PHP version from MAMP, you should edit or add .bash_profile in the user's home directory, that is : cd ~

In .bash_profile, add following line:

export PATH=/Applications/MAMP/bin/php/php5.4.10/bin:$PATH

Then,you should use command cd /Applications/MAMP/bin/php to check which PHP version from MAMP you are using and then replace with the PHP version above.

Then restart the terminal to see which PHP you are using now.

And it should be working now.

Thank You!!

answered Nov 11, 2020 by Niroj
• 82,880 points

Related Questions In Laravel

0 votes
1 answer

Error:“The page has expired due to inactivity” - Laravel 5.5

Hello @kartik, Make sure you have already added ...READ MORE

answered Aug 4, 2020 in Laravel by Niroj
• 82,880 points
2,752 views
0 votes
1 answer

How Can I Remove “public/index.php” in the URL Generated Laravel?

Hello @kartik, If it isn't already there, create ...READ MORE

answered Aug 10, 2020 in Laravel by Niroj
• 82,880 points
12,836 views
0 votes
1 answer

How can I echo the version of the current Laravel version in php using the view?

Hello @kartik, This is the way how to ...READ MORE

answered Aug 10, 2020 in Laravel by Niroj
• 82,880 points
877 views
0 votes
1 answer

Error:Laravel Migration table already exists but i want to add new not the older

Hello @kartik, You need to run php artisan migrate:rollback if ...READ MORE

answered Aug 11, 2020 in Laravel by Niroj
• 82,880 points
10,697 views
+1 vote
1 answer

How to make anchor tag with routing using Laravel?

Hey @kartik, First you have to go to ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,880 points
21,748 views
0 votes
1 answer

What is redirection in Laravel?

Named route is used to give specific ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,880 points
2,647 views
0 votes
1 answer

How to install Laravel via composer?

Hello, This is simple you just need to ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj
• 82,880 points
2,504 views
+1 vote
1 answer

What are named routes in Laravel and How can specify route names for controller actions?

Hey @kartik, Named routing is another amazing feature of ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj
• 82,880 points
41,359 views
+1 vote
1 answer

Error:Class '\App\User' not found in Laravel when changing the namespace in Laravel?

Hello @kartik Go to config/auth.php and change App\User:class ...READ MORE

answered Apr 3, 2020 in Laravel by Niroj
• 82,880 points
29,370 views
0 votes
1 answer

Error:Laravel PHP Command Not Found

Hello @kartik, Try the follwing snippet: nano ~/.bash_profile And ...READ MORE

answered Jul 30, 2020 in Laravel by Niroj
• 82,880 points
6,630 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP