Installing Symfony 1.1 svn beside 1.0 stable
December 22, 2007
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 http://svn.symfony-project.com/branches/1.1 .
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 /usr/bin/symfony1.1
(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 </Directory>
<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 </Directory> </VirtualHost>
Have fun!
December 24, 2007 at 2:13 am
[...] Installing Symfony 1.1 svn beside 1.0 stable [...]
December 30, 2007 at 8:50 pm
[...] Installing Symfony 1.1 svn beside 1.0 stable [...]
January 5, 2008 at 3:40 pm
[...] Installing Symfony 1.1 svn beside 1.0 stable [...]
January 6, 2008 at 4:55 pm
spoke about it in my blog too a while ago:
http://www.symforc.com/post/2006/08/01/Testing-Symfony-11
February 4, 2008 at 10:53 pm
Nice step-by-step walkthrough. I’m going to give it a try this week.
February 27, 2008 at 4:37 pm
[...] 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 [...]
May 11, 2008 at 7:42 pm
Thanks a lot for this tutorial :)
June 12, 2008 at 12:06 pm
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.
July 21, 2008 at 10:53 am
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.
August 4, 2008 at 11:40 am
[...] Installing Symfony 1.1 svn beside 1.0 stable カテゴリ:Linux, PHP, Tips タグ:cd, Linux, LLフレームワーク, log, pear.lib, PHP, [...]
August 7, 2008 at 7:05 pm
Very usefull article, thx
August 15, 2008 at 8:05 pm
[...] 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! [...]
August 23, 2008 at 10:08 am
Great post!
Any idea how this could be done under windows xp (no symlink available!)??
November 7, 2008 at 6:53 pm
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.
June 24, 2009 at 6:19 am
[...] (参考) http://symfoniac.wordpress.com/2007/12/22/installing-symfony-11-svn-beside-10-stable/ [...]
October 31, 2009 at 1:45 pm
http://jgfuyouopp.com/