How to install Laravel in MAMP-MAC

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

shabeebk.com-php-version-check

   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

laraval-install-mac_1

laraval-install-2

laraval-install-3

laraval-install-4

  Finally it will show like installed. Application key (*******) installed successfully.

 

Now let us go to browser and check the URL.

Screen Shot 2014-12-25 at 9.56.18 pm

That is it!

 

 

 

 20,390 total views,  4 views today

18 Comments

  1. 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

  2. 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!!!

  3. Whole Body Garcinia

    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!

  4. Online web Cash

    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.

  5. The Easy life Online

    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.

  6. Very couple of web sites that come about to become detailed beneath, from our point of view are undoubtedly properly worth checking out.

  7. 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.

  8. 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!!

  9. Incredible points. Solid arguments. Keep
    up the great work.

  10. just beneath, are several completely not associated websites to ours, on the other hand, they may be surely really worth going over

  11. design windows and doors

    November 6, 2015 at 6:46 am

    usually posts some quite intriguing stuff like this. If youre new to this site

  12. Thanks buddy its perfect!!

  13. Here is a superb Weblog You might Obtain Interesting that we Encourage You

  14. Sites of interest we’ve a link to

  15. Great delivery. Outstanding arguments. Keep up the great effort.

  16. I appreciate you sharing this article.Really thank you! Much obliged.

  17. A round of applause for your post.Thanks Again. Much obliged.

2 Pingbacks

  1. Pingback: How to align my PHP version on my Mac with the PHP version installed in MAMP during Laravel installation? - DexPage
  2. Pingback: How to align my PHP version on my Mac with the PHP version installed in MAMP during Laravel installation? - php

Leave a Reply

Your email address will not be published.