Installing Symfony 1.1 svn beside 1.0 stable

December 22, 2007

Symfony 1.0 and 1.1 together! ;-)Announcements about Symfony 1.1 are becoming more frequent and with the creation of the 1.1 branch many users want to try it out and simply play around with 1.1 during the holiday season.

This guide is derived from InstallingMultipleVersionsOfSymfony and assumes you already have Symfony 1.0 installed (via PEAR) and running. Also note that i will use the PEAR directory to store Symfony 1.1 alongside my 1.0 installation, you can however put it wherever you like.

First off, check where your current Symfony installation is located. You could for example look at one of your projects “config/config.php” file – in my case it’s “/usr/lib/php/pear/symfony“, therefore i will be installing Symfony 1.1 one level above into “/usr/lib/php/pear“.

Create a directory for your installation and check out the current 1.1 branch:

sudo mkdir /usr/lib/php/pear/symfony_11
cd /usr/lib/php/pear/symfony_11
sudo svn co .

After the checkout is done, the next step is to create a symlink to the “symfony” php executable of the 1.1 checkout. You can find out where your current symfony command is stored with:

whereis symfony

In my case it’s located in “/usr/bin/“, that’s also where i will create the new symlink:

sudo ln -s /usr/lib/php/pear/symfony_11/data/bin/symfony 

(Note: It’s important to use absolute paths here)

With this done, you will still have your usual “symfony” command which is linked against your stable PEAR version but also a new “symfony1.1” command which is linked against your subversion checkout.
You can verify it easily by executing each command with the -V parameter.

If everything is working, create a new symfony 1.1 project (as you might already know, Symfony 1.1 features new CLI commands, you can see them by executing the “symfony1.1” command):

mkdir sf11test && cd !$
symfony1.1 generate:project foobar
symfony1.1 generate:app frontend
symfony1.1 generate:module frontend helloworld

Finally, the only thing left to do is to create a Virtual Host, it’s identical to the ones you created for your Symfony 1.0 project except for the path, don’t forget to change it to the location of your symfony 1.1 branch!

<Directory "/usr/lib/php/pear/symfony_11/data/web/sf/"> 
  AllowOverride All 
  Allow from All
<VirtualHost *:80>  
  ServerName sf11test  
  DocumentRoot "/Users/arthur/Webdev/sf11test/web"  
  DirectoryIndex index.php  

  Alias /sf /usr/lib/php/pear/symfony_11/data/web/sf/
  <Directory "/Users/arthur/Webdev/sf11test/web">    
    AllowOverride All    
    Allow from All  

Have fun!


17 Responses to “Installing Symfony 1.1 svn beside 1.0 stable”

  1. […] Installing Symfony 1.1 svn beside 1.0 stable […]

  2. […] Installing Symfony 1.1 svn beside 1.0 stable […]

  3. Junni Says:

    Nice step-by-step walkthrough. I’m going to give it a try this week.

  4. […] a tie-in to this excellent how-to for installing both versions of Symfony, I’ve decided to extend the method to apply to Vista as […]

  5. Hugo Says:

    Thanks a lot for this tutorial :)

  6. Rob Holmes Says:

    Thank you for the great run through. This is just what i’ve been looking for!

    I’ll be starting to play around with Symfony 1.1 soon. Although i’m a little confused by the look of the new form system :-S

    Thanks again Arthur.

  7. Junni Says:

    Thanks for a clear step-by-step tutorial. I’m using 1.0.17 for all my projects, but for my latest I want to use the 1.1.

  8. […] Installing Symfony 1.1 svn beside 1.0 stable カテゴリ:Linux, PHP, Tips タグ:cd, Linux, LLフレームワーク, log, pear.lib, PHP, […]

  9. Firebird Says:

    Very usefull article, thx

  10. […] Artikel darüber schreiben, wie man beide Versionen unter Debian zum laufen bringt – dann fand ich diesen Beitrag. Deswegen spare ich mir das jetzt und schreibe halt doch Nichts dazu! […]

  11. Thomas Says:

    Great post!
    Any idea how this could be done under windows xp (no symlink available!)??

  12. Using xampp, put this in vhosts.conf

    ServerName mysite:80
    DocumentRoot “\xampp\htdocs\mysite\web”
    DirectoryIndex index.php
    Alias /sf /xampp/php/data/symfony_11/web/sf

    AllowOverride All
    Allow from All

    Options FollowSymLinks Includes
    AllowOverride all
    order allow,deny
    allow from all

    The alias directive takes care of the symbolic link.

  13. Jude Holtorf Says:

    Surprisingly provocative blog blurb.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: