Running multiple versions of the Symfony framework on Windows
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.
- Check out: http://svn.symfony-project.com/tags/RELEASE_1_3_4/lib/
- Into: C:\php\PEAR\symfony13
- Check out: http://svn.symfony-project.com/tags/RELEASE_1_3_4/data/
- 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.
//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.
Allow from All
DirectoryIndex index.htm, index.php
Alias /sf "c:\php\data\symfony13\web\sf"
Allow from All
I checked my web config by visiting //symfony13/ in my browser
I also checked the Symfony config at the command line:
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
This entry was posted on Monday, May 10th, 2010 at 6:51 pm and is filed under Programming, Tutorials. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.