Menu

Lesson 1 : Symfony 2 Configuration

p5chi
Attachments
welcome.jpg (16962 bytes)

First, check that you have installed and configured a Web server (such as Apache) with PHP 5.3.2 or higher, in this case it's used WampServer and Windows 7 OS.
Next Start downloading the "Symfony2 Standard Edition" , a Symfony distribution that is preconfigured for the most common use cases and also contains some code that demonstrates how to use Symfony2 (get the archive with the vendors included to get started even faster).
After unpacking the archive under your web server root directory, you should have a Symfony/ directory that looks like this:

www/ <- your web root directory
    Symfony/ <- the unpacked archive , transform it to x-share.local
        app/
            cache/
            config/
            logs/
            Resources/
        bin/
        src/
            Acme/
                DemoBundle/
                    Controller/
                    Resources/
                    ...
        vendor/
            symfony/
            doctrine/
            ...
        web/
            app.php
            ...

Next go to C:\Windows\System32\drivers\etc\ find file named hosts open it and add the following line:

# C:\Windows\System32\drivers\etc\
127.0.0.1     x-share.local

Also create a virtual host, add those lines in httpd-vhosts.conf file :

#\path_to_wamp_installation\bin\apache\Apachex.x.x\conf\extra\httpd-vhosts.conf
<VirtualHost 127.0.0.1>
  ServerName x-share.local
  DocumentRoot "/var/www/x-share.local/web"
  DirectoryIndex app.php
  <Directory "/var/www/x-share.local/web">
    AllowOverride All
    Allow from All
  </Directory>
</VirtualHost>

Now when you access the http://x.share.local you will have this:

Welcome Symfony2

For more explanation access this link :
http://symfony.com/doc/current/quick_tour/the_big_picture.html