Can't make Laravel 4 to work on localhost Can't make Laravel 4 to work on localhost laravel laravel

Can't make Laravel 4 to work on localhost


Try to change the folder permissions for the storage folder using the terminal:

chmod -R 777 storage

More info on this matter can be found here.


Your errors resulted because laravel couldn't write to the app/storage folder. The rest was just a stack trace. In order to make the storage folder writable, cd into your app folder and then run:

chmod -R 777 storage


Production way, moderate complexity for people not familiar with Unix, but more secure:

  1. Go in super user mode (sudo -s or su).
  2. Create group web (groupadd web)
  3. Add you main user to group web (suppose your user is cool_user, so run usermod -a -G web cool_user)
  4. Add php-fpm or web server user (if php is used as a SAPI module) to web group (for example, on CentOS php-fpm utilize apache user name, so in most cases this will work: usermod -a -G web apache)
  5. Change your project root directory group owner to web recursively (chgrp -R web /path/to/project/root/)
  6. Grant recursively write permission for group (chmod -R g+w /path/to/project/root/
  7. Optionally To allow all newly created by apache (or some other) user files and folders be accessible from your user, make them receive group ownership same as their parent folder by setting groupid bit recursively on your project root directory (chmod -R g+s /path/to/project/root/).

Voila!.

Fast and dirty way, for those who doesn't care about security and want make it works at any cost, not secure:

  1. Go in super user mode (sudo -s or su).
  2. Grant recursively full permission (read, write, execute) for all users (chmod -R o=rwx /path/to/project/root/