Running multiple versions of the Symfony framework on Windows

As the Symfony project continues to develop I thought it was about time I upgraded to the latest stable version, Symfony 1.3

As I am sure to build several websites with this framework, it is important for the Symfony system files to be shared between all of my projects. Therefore the library files need to go in my PHP folder. I also need all of my existing web sites, built with version 1.0 to remain intact.

Symfony uses two folders which reside in my PHP installation folder.


Firstly I created two new folders to sit along side the existing ones.


I then checked out the latest release of Symfony 1,3 with SVN.

Library files.

  • Check out:
  • Into: C:\php\PEAR\symfony13

Data files.

  • Check out:
  • Into: C:\php\data

I then grabbed a copy of a sandbox project from the Symfony web site, added it to by webroot folder and deleted the vendor/symfony library folder.

I updated the config file to point to the new symfony 13 folder insode my PHP directory.

require_once 'C:\php\PEAR\symfony13\autoload\sfCoreAutoload.class.php';

//register the autoload

class ProjectConfiguration extends sfProjectConfiguration
public function setup()

I then setup a local host by adding an entry to hosts file

Then configuring the vHost container to point to the new project folder. There is also an alias directory pointing to the sf folder which will be shared between projects.

#symfony 1.3

ServerName symfony13
DocumentRoot "C:\webroot\symfony13\web"

AllowOverride All
Allow from All
DirectoryIndex index.htm, index.php

Alias /sf "c:\php\data\symfony13\web\sf"

AllowOverride All
Allow from All

I checked my web config by visiting //symfony13/ in my browser

I also checked the Symfony config at the command line:

cd c:\webroot\symfony13
symfony -V

symfony version 1.3.4 (C:\php\PEAR\symfony13)

All done. The new app is running on 1.3 while my existing sites work with 1.0

Leave a Reply