Wednesday, November 9, 2011

Setup and Install Symfony 2.0 project

1. Download Symfony2

       * From Symfony website Click here or
       * Use Command line
            cd /var/www (web directory)
    wget -O symfony2.tgz http://symfony.com/download?v=Symfony_Standard_Vendors_2.0.5.tgz

2.  Extract the files

       Use the command :  tar xfz symfony2.tgz

       A direcory 'Symfony' is created in /var/www directory.

3.  Goto http://localhost/Symfony/web/config.php to check the configation settings.

        The are some problems amd some recomentions are listed. Fix the these for better results.

4. Install and enable the SQLite3 or PDO_SQLite extension.

       Use the command :  sudo apt-get install php5-sqlite

5. Give permission to cache folder and logs folder

Use the command :  sudo chmod -R 777 /var/www/Symfony/app/cache
         Use the command : sudo chmod -R 777 /var/www/Symfony/app/logs

6. Set the “date.timezone” setting in php.ini* (like Europe/Paris).

            Open php.ini file and find ';date.timezone ='. Uncomment (remove ';') and give the appropriate timezone value from PHP’s list of timezones.(http://us2.php.net/manual/en/timezones.php)  as below.

date.timezone =Asia/Calcutta (As I am in India)

7. Install and enable a PHP accelerator like APC (highly recommended).

Use the command : sudo apt-get install php-apc

8. Install and enable the intl extension.

Use the command : sudo apt-get install php5-intl

9. Set short_open_tag to off in php.ini.

Open php.ini file and find 'short_open_tag = On'. Change it to 'short_open_tag = Off'

10. Restart apache

      sudo apache2ctl restart ( sudo /etc/init.d/apache2 restart )