0

I am trying to install Laravel for first time. I installed it on my desktop with the following composer command

composer create-project laravel/laravel laravel-app 

The command completed successfully without any error but with some messages like

symfony/var-dumper suggests installing ext-symfony_debug () symfony/translation suggests installing symfony/config () 

I now did chmod -R 777 larvel-app to make whole folder writable by everyone. I now started php server with following command

cd laravel-app php artisan serve 

and it gave following message

Laravel development server started on http://localhost:8000 

When viewed from web browser in address http://localhost:8000, there is nothing, only blank page. When I browse this address, the server seems to quit.

I have following environment: OSX Mavericks; MAMP with php 5.4.10 and apache2; following extensions in php.ini file

extension=imap.so extension=yaz.so extension=mcrypt.so extension=gettext.so extension=pgsql.so extension=pdo_pgsql.so extension=pdo_mysql.so ;;;;;Following are added by me ;;;;no error when starting server extension=openssl.so extension=mbstring.so 

When I run which php from command line, I get following.

/Applications/MAMP/bin/php/php5.4.10/bin/php 

When I tried to run this in mamp ie localhost:8888, it gave 500 internal server error.

Please suggest me, where I might have made mistake.

1
  • As a Mac user, i really recommend you to use homestead. Commented Feb 20, 2015 at 13:46

4 Answers 4

1

As a OSX user i strongly recommend you to use Laravel Homestead to develop your applications.

http://laravel.com/docs/5.0/homestead

You only need to install:

  • Virtualbox
  • Vagrant

I have my projects in ~/code folder, so everytime i create a new project, i just:

  • Add project test domain to my local host file (my-project.app pointing to localhost 127.0.0.1)
  • ssh into the homestead virtualmachine (homestead ssh)
  • run built in serve command (serve my-project.app /path/to/project/public)
  • Voilà
Sign up to request clarification or add additional context in comments.

Comments

1

The most common reason for this is that the web server process does not have write access to the storage folder and its subfolders.

Set the permissions on the storage folder so that the web server can create files.

Comments

1

You don't have to use php serve, mamp does that for you. Make sure you point your directory to public folder. You can also use custom domain for each of your projects.

Also for Mac there is laravel valet. Easy to get started with many php projects.

Comments

0

I think you should move your Laravel Application to

/Applications/MAMP/htdocs/ 

and then you can access it on

http://localhost:8888/laravel-app 

6 Comments

Then please look in the error log. /Applications/MAMP/logs/php_error.log
PHP Fatal error: Cannot redeclare class Symfony\Component\Finder\Iterator\FilterIterator in /Applications/MAMP/htdocs/laravel-app/storage/framework/compiled.php on line 15267
github.com/laravel/framework/pull/7429 This error has been fixed 4 days ago, try to update. Remove your Laravel Application then run composer self-update and composer update. Then try it again with composer create-project laravel/laravel laravel-app
Similar problem reported after implementing your suggestion
You can change it, but it's for artisan commands. But first try to repeat the installation but this time with composer create-project laravel/laravel laravel-app --prefer-dist
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.