Part #1 Install and Configure Symfony

Download and configure Symfony basics

Download Symfony Standard Edition from
Uncompress it to your root folder (usually www) and you shoud get this structure:

app bin deps deps.lock LICENSE src vendor web

Give writing permissions to cache and logs folders

chmod -R 777 app/cache app/logs

To check Symfony requirements run:

php app/check.php

You should get as much as OKs as possible

** Mandatory requirements **

OK Checking that PHP version is at least 5.3.2 (5.3.8 installed)
OK Checking that the \\\"date.timezone\\\" setting is set
OK Checking that app/cache/ directory is writable
OK Checking that the app/logs/ directory is writable
OK Checking that the json_encode() is available
OK Checking that the SQLite3 or PDO_SQLite extension is available
OK Checking that the session_start() is available
OK Checking that the ctype_alpha() is available
OK Checking that the token_get_all() is available
OK Checking that the APC version is at least 3.0.1

Recursive delete cache and logs content:

rm -rf app/cache/* app/logs/*

To empty cache, write logs and do some other actions you will need to give permissions to Apache:

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

Change www-data to apache or apache2 if needed your linux distribution.

If you haven\\\'t got root access then add:


At the beginning of the files web/app.php, web/app_dev.php and app/console

If everything is alright then you should see the welcome page from your browser:

Click on \\\"Configure\\\" and set the database name and all the other parameters,
these parameters are stored in the file app/config/parameters.ini that can be used to manually configure the project


You may eventually create a virtual host

DocumentRoot /home/my_folder/public/Symfony/web

DirectoryIndex app.php
Options -Indexes FollowSymLinks SymLinksifOwnerMatch
AllowOverride All
Allow from All

One database by project, as you can see, as Symfony 2 is an ORM (Object Relational Mapping) Framework if you want to use database mapping

[Back to Learn Symfony]