Backend and Infrastructure

Download and Configure Symfony

This page is archived

We're keeping this page up as a courtesy to folks who may need to refer to old instructions. We don't plan to update this page.

Alternate resources

Sprout Video

In this lesson, we're going to get things all set up using Composer. If you are not familiar with Composer, you can watch the Wonderful World of Composer tutorial to get up to speed. Once we have Symfony installed, we'll take a tour of the directory structure, and then we'll get things set up to start developing our application with Git.

Apache Notes

If you’re using Apache instead of PHP 5.4's built-in web server, and you've downloaded the project to your Apache document root, then you can go to http://localhost and find your way to the config.php script at http://localhost/starwarsevents/web/config.php. The URL for your app will be http://localhost/starwarsevents/web/app_dev.php.

Fixing Permissions Issues

The easiest permissions fix is to add a little umask function to the top of 2 files. Pop open your project in your favorite editor (we love PhpStorm). Open up app/console and web/app_dev.php. You’ll see a little umask line there. Uncomment this:

#!/usr/bin/env php
<!--?php
umask(0000);
// ...

What the heck? The umask function makes it so that cache and logs files are created as 777 (world writable). Once you’re done, set the permissions on the two cache and logs directories:


$ chmod -R 777 app/cache/* app/logs/*
You shouldn’t have any more issues, but if you do, just set the permissions again.

This method can be a security issue if you’re deploying to a shared server. Check out Symfony’s installation chapter for details on other ways to setup your permissions.


Additional resources

Symfony website Symfony installation documentation Composer website
Downloads