Laravel

From HaFrWiki
Revision as of 12:29, 15 November 2014 by Hjmf (talk | contribs) (Created page with "{{TOCright}} Laravel is a PHP framework around symfony 2. The documentation on this framework can be found on multiple places on the Internet. But to use Lavarel on an OS/X M...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Laravel is a PHP framework around symfony 2. The documentation on this framework can be found on multiple places on the Internet. But to use Lavarel on an OS/X Mac in combination with MAMP-PRO may cause some difficulties.

artisan

When trying to run the command line tools of Lavarel I got:

   $ php artisan 
   Mcrypt php extension required.
   $

The problem is caused by the fact that the used version of PHP is not the correct one. First try:

  $ php -v
  PHP 5.4.30 (cli) (built: Jul 29 2014 23:43:29) 
  Copyright (c) 1997-2014 The PHP Group
  Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
     with Xdebug v2.3.0dev, Copyright (c) 2002-2013, by Derick Rethans

Now look in the Application directory of MAMP

  $ la /Applications/MAMP/bin/php
  total 0
  drwxrwxr-x  6 HaFrMpro  admin  204 Jan 22  2013 php5.2.17
  drwxrwxr-x  6 HaFrMpro  admin  204 Jan 22  2013 php5.3.20
  drwxrwxr-x  7 HaFrMpro  admin  238 Jan 22  2013 php5.4.10

Choose the PHP version 5.4.10 and place the following code in you .bash_profile

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

Let me know if this helps

MAMP PRO

See also

top

Reference

top