Symfony Install and Setup for Windows XP with Apache 2.2

The following is a compilation of notes taken while installing and configuring Symfony for Windows XP with Apache 2.2:

The Process

  • Make sure that PHP is installed, then go to your PHP directory (i.e., C:\php) and double click go-pear.bat.
  • It will ask whether you would like to install a system-wide or local copy, type in “local” and press enter, it will ask you to confirm, type in “yes” and press enter.
  • You should see a list displaying a suggested file layout, press enter and continue.
  • The installer will ask if you would like to “alter php.ini” type in “Y” and press enter.
  • After the installer has completed, open up a command prompt window and go to the root directory (i.e., C:\). You can do this by typing: “cd \”.
  • From the command prompt type: “pear channel-discover” and press enter. It should tell you “Discover of channel “’ succeeded”.
  • Now to install symfony, type in:
Pear install symfony/symfony
  • You should see text that says “downloading symfony-1.0.6.tgz” and some loading progress, after the download is completed it will install symfony, and if everything goes well it will say “install ok”.
  • After the installation is complete, navigate to the directory in which you would like to initialize your first symfony project and make sure that it’s within your web root (e.g., C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\symfony).
  • When you’re in your target directory type:
symfony init-project myproject
  • You should see a dump of assets. When it’s complete, type in:
symfony init-app myapp
  • After this is complete, navigate to the directory into which you initiated your symfony project (e.g., C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\symfony) and verify that within the “web” directory that there is an “sf” folder, chances are that folder is nonexistent. You’ll need to navigate to C:\php\PEAR\data\symfony\web\ (or, in my case: C:\php5\pear\data\symfony\web\) and copy the “sf” folder from there into the “web” folder within your install directory. You should be good to go.

8 thoughts on “Symfony Install and Setup for Windows XP with Apache 2.2”

  1. very helpful doc. Simple and straight to the point!

    +5 for Keeping It Simple for Stupid (i.e. – me)


  2. Very simple and helpful document. Thanks….

    I couldn’t follow symfony inst. Don’t like following inst…

  3. Yes this one is perfect!

    Someone maybe should recommend it for the official site also? Didnt see any Windows tutorial on their site atleast!

    +5 is to less, I’ll give you a +6 ;)

    Have a nice day!

  4. Hello
    Can someone explain me why when i double click on go-pear.bat i have this message?
    “coud not open go-pear.phar” ?

  5. Lyn,

    Do you have a “go-pear.phar” file in your PEAR directory (i.e. “C:\php\PEAR”)? You may have a corrupt PEAR install, try reinstalling.

  6. gotta try this one out later. am new to programming, i’ve been looking around for some tips and tutorials.

Comments are closed.