Symfony

Published on Christian Mayer's Weblog

Symfony Logo

Symfony describes itself as …

[...] a PHP framework for web projects.
Speed up the creation and maintenance of your PHP web applications. Replace the repetitive coding tasks by power, control and pleasure.

Building a website with Symfony. First of all you need a development environment. This is what my development environment looks like:

You can download Symfony Standard Edition from the symfony.com homepage or you can install it with Composer.

I used Composer because you can better manage extra packages and bundles for Symfony too.

$ composer.phar create-project symfony/framework-standard-edition project_directory/ 2.3.4

You will be prompted for standard configuration settings. Also see app/config/parameters.yml. Read the Installing and Configuring Symfony documentation for detailed information about how to install and configure Symfony.

This first problem I got was a write error for the directories app/cache and app/logs. The main problem was that the /var/www directory is mounted to the local work directory as user vagrant. The Apache process runs under www-data. So I decided to run the Apache process also as vagrant. With a live production server (maybe Debian) you don’t need to run Apache as another user as www-data because you only set the owner and the group of app/cache and app/logs to www-data. Run the following as root in your Symfony base directory.

$ chown -R www-data:www-data app/cache app/logs

This problem is only in the Vagrant box because the /var/www directory is mounted to your local machine.

Recent Posts

About the Author

Christian is a professional software developer living in Vienna, Austria. He loves coffee and is strongly addicted to music. In his spare time he writes open source software. He is known for developing automatic data processing systems on Debian Linux server.

Categories: Productivity, Programming
Tags: Symfony, PHP, Framework, Work, Developer, Development, HOWTO

Archive | Categories | RSS Feed | Usage | Imprint
Copyright © 2006 by