Installing Symfony Framework into XAMPP for Windows

seiler.IT > English Version > Projects > Installing Symfony Framework

Getting started

  1. Download a fresh copy of ApacheFriend XAMPP System.
    http://www.apachefriends.org/de/xampp-windows.html
  2. Set right include path and to make sure that all pear packages will be installed in the right locations.
    1. Goto System Properties into the Advanced tab.
    2. Click on Environment Variables
    3. Extend the path variable by adding your path to php, mysql and pear:
      In my case, as I installed XAMPP to d:\progs\xampp, it was like adding
      ;d:\progs\xampp\php\PEAR\symfony;d:\progs\xampp\mysql\bin;d:\progs\xampp\php;d:\progs\xampp\php\PEAR
  3. Open a command line (Start menu, Start Application, Run "cmd"
  4. Enter your XAMPP directory:
    d:
    cd progs\xampp
    (This can be different for you!)
  5. Upgrade pear:
    pear upgrade pear
  6. Install phing:
    pear install -a http://phing.info/pear/phing-current.tgz --alldeps
  7. Install symfony:
    1. pear channel-discover pear.symfony-project.com
    2. pear install symfony/symfony
  8. Update your \xampp\apache\conf\httpd.conf:
    #
    # Use name-based virtual hosting.
    #
    NameVirtualHost myproject:80

    #access to /sf - directory

    Allow from All

    #symfony myproject

    ServerName myproject
    DocumentRoot "d:\progs\xampp\htdocs\myproject\web"
    DirectoryIndex index.php
    Alias /sf "D:\progs\xampp\php\PEAR\symfony\data\web\sf"


    AllowOverride All
    Order allow,deny
    Allow from All




  9. Update your C:\WINDOWS\system32\drivers\etc\hosts:
    		127.0.0.1         localhost
    	127.0.0.1         myproject
    	
  10. Start console again and goto xampp\htdocs and create the directory "myproject" there.
  11. Run symfony generate:project myproject
  12. Run symfony generate:app frontend
    (This assumes, you will need a app called frontend.)
  13. Open http://myproject/ in your browser. You should see the default symfony page, saying:
    "Symfony Project Created Congratulations! You have successfully created your symfony project."
  14. Start your own Symfony project now!