I had the same problem, your system does not use MAMP
PHP
, but instead uses the PHP
that comes with your mac.
I took notes on how I installed laravel
when MAMP
already installed. Hope you and others find this helpful.
a. add MAMP
PHP
to PATH VARIABLE
in .bash_profile
export PATH=/Applications/MAMP/bin/php/php5.5.10/bin:$PATH
b. install Composer
-go to http://www.getcomposer.org/ β getting started β copy globally and execute the following commands on the terminal ...
cd ~ curl -sS https:/?getcomposer.org/installer | php sudo mv composer.phar /usr/local/bin/composer
c. install laravel
in the MAMP/htdocs
folder using Composer
, on the terminal ...
cd /Applications/MAMP/htdocs composer create-project laravel/laravel neji
** where neji is the name of your website / project
d. edit /private/etc/hosts
sudo nano /private/etc/hosts
add 127.0.0.1 neji
to the buttom file. save and exit
e. using any editing of the text editor /Applications/MAMP/conf/apache/httpd.conf
uncomment, deleting #
before turning it on ... on virtual hosts, see below, where ...
# Virtual Hosts
becomes ...
f. using any text editing editor /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
add the following text at the bottom
# I am not sure about this since DocumentRoot does not points to the public folder # but I still added it and it working, maybe someone will clarify this part <VirtualHost *:80> ServerAdmin localhost DocumentRoot "/Applications/MAMP/htdocs" ServerName localhost ServerAlias www.localhost # ErrorLog "logs/dummy-host.example.com-error_log" # CustomLog "logs/dummy-host.example.com-access_log" common </VirtualHost> # this one, I think is the code that makes it work bec the DocumentRoot points to public folder <VirtualHost *:80> ServerAdmin neji.dev DocumentRoot "/Applications/MAMP/htdocs/neji/public/" ServerName neji.dev ServerAlias www.neji # ErrorLog "logs/dummy-host.example.com-error_log" # CustomLog "logs/dummy-host.example.com-access_log" common </VirtualHost>
** 2 notes
1, set the ServerName name to your project name (neji.dev)
2nd, install DocumentRoot in the shared folder
g. open your project using your fav browser
neji.dev/
** don't forget /
at the end
You should see a laravel
welcome laravel
.
Then after a few days, switch to VM
:)