Today i was trying to install laravel in MAMP , While going through their step on laravel site mentioned i found that i didn installed mycript extension. I had googled for lot of time and lastly i installed .
I am writing this will help some one to install laravel in Mac using MAMP.
Install composer
Before installing laravel we have to install composer . We can go to https://getcomposer.org/ and we can install from from there or we can follow the following steps step
1. first we have to check curl is enabled . step 2. we can install composer globally as mentioned in their site
curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer
Install Laravel
1.once we installed composer we have to move to htdocs and to our directory from our terminal
cd /directory/folder
2. We can tell composer to download laravel and install by following commands
composer global require "laravel/installer=~1.1"
composer create-project laravel/laravel your-project-name --prefer-dist
And here it will come to as for mycrypt extension .
Mcrypt PHP extension required.
To solve this issue we have to check the php version frist
php -v
3.Now let us have our PHP version, in my case 5.6.2, we can open our .bash_profile script
nano .bash_profile
4. Add our MAMP PHP version after the code already present ,Exit the file and Save it.
export MAMP_PHP=/Applications/MAMP/bin/php/php5.5.10/bin export PATH="$MAMP_PHP:$PATH"
5. Now we can try to install Laravel again That is it!.
composer create-project laravel/laravel your-project-name --prefer-dist
6. We can see Laravel is downloading and installing
Finally it will show like installed. Application key (*******) installed successfully.
Now let us go to browser and check the URL.
That is it!
21,364 total views, 1 views today
December 28, 2014 at 5:34 pm
I would also say:
When installing Laravel you may be prompted to install the command line tools or to install Xcode – either one is fine although the command line tools on its own is quicker to download.
section 2:
This is really just a sanity check because if you get the mcrypt error while trying to install Laravel inside MAMP it’s highly likely the wrong PHP version is being referenced by the system.
Find which version you are using in MAMP by navigating in the MAMP App to Preferences then PHP tab.
Use “php -v” OR you can use the faster “which php” to find out which version the system is using. If its not the same PHP version you are using in MAMP then you need to run section 3.
section 3:
This is needed because mCrypt does not exist in OSX’s default PHP library but does exist in MAMP’s PHP libraries.
The .bash_profile file will need to be re-edited each time you change which version of PHP you are using in MAMP.
The .bash_profile file should be created in /users/yourloginname (nano will create it if the file does not yet exist).
You will either need to restart your computer or run:
“source ~/.bash_profile” in order for the system to accept the new .bash_profile
December 30, 2014 at 9:34 am
Thank you Phil,
April 2, 2015 at 9:37 am
Hi Shabeeb and Phil, thanks so much for your posts. I was trying to install laravel without any success, until I came across your post. Thanks a million, guys!!!
June 1, 2015 at 3:23 pm
Good day! This is my first visit to your blog! We are a collection of volunteers
and starting a new initiative in a community in the same niche.
Your blog provided us beneficial information to work
on. You have done a extraordinary job!
June 1, 2015 at 4:53 pm
Ahaa, its good dialogue on the topic of this post here at this weblog, I
have read all that, so now me also commenting at this place.
June 2, 2015 at 2:11 pm
Hey There. I found your blog using msn. This is an extremely
well written article. I’ll make sure to bookmark it and come back to read more
of your useful information. Thanks for the post. I will certainly comeback.
June 23, 2015 at 12:20 pm
Very couple of web sites that come about to become detailed beneath, from our point of view are undoubtedly properly worth checking out.
August 18, 2015 at 5:07 am
If some one needs expert view about blogging and site-building after that i propose him/her to pay a quick visit this webpage, Keep up the nice work.
August 27, 2015 at 7:20 am
Excellent blog you have got here.. It’s hard to find good quality writing like yours these days.
I seriously appreciate people like you! Take care!!
September 19, 2015 at 6:44 am
Incredible points. Solid arguments. Keep
up the great work.
November 5, 2015 at 1:22 pm
just beneath, are several completely not associated websites to ours, on the other hand, they may be surely really worth going over
November 6, 2015 at 6:46 am
usually posts some quite intriguing stuff like this. If youre new to this site
November 7, 2015 at 4:25 pm
Thanks buddy its perfect!!
November 8, 2015 at 6:34 pm
Here is a superb Weblog You might Obtain Interesting that we Encourage You
December 21, 2015 at 8:25 am
Sites of interest we’ve a link to
September 28, 2016 at 11:57 pm
Great delivery. Outstanding arguments. Keep up the great effort.
January 11, 2017 at 9:09 pm
I appreciate you sharing this article.Really thank you! Much obliged.
February 21, 2017 at 4:22 pm
A round of applause for your post.Thanks Again. Much obliged.