2
votes

i have a directory with some .php files in it...do i need to install symfony in that directory so that i can run symfony commands from that directory?? i tried: pear channel-discover pear.symfony-project.com

and got: Channel "pear.symfony-project.com" is already initialized

the i tried: pear install symfony/symfony

and got: WARNING: configuration download directory "/build/buildd/php5-5.3.2/pear-build-download" is not writeable. Change download_dir config variable to a writeable dir to avoid this warning Cannot install, php_dir for channel "pear.symfony-project.com" is not writeable by the current user

how do i fix this please? must i run it as sudo?? thanks

2

2 Answers

1
votes

If I remember well, Symfony is "system-wide" if installed through PEAR (like you are trying to do).

Now it is recommended by the manual to do a "standalone" install through SVN. See http://www.symfony-project.org/gentle-introduction/1_4/en/03-Running-Symfony

As well, the sandbox will bring a "standalone" installation of Symfony (you will have to be in the project root directory to be able to run the symfony commands)

EDIT

Example of quick install using SVN:

mkdir /path/to/symfony
cd /path/to/symfony
svn checkout http://svn.symfony-project.com/tags/RELEASE_1_4_0 .

but it should be better to follow the manual and configure the external SVN sources.

0
votes

I run servers where I have applications that use different versions of symfony simultaneously. I found it much easier to deal with the SVN checkout than the PEAR insteall.

So what I've done is do an SVN checkout of each revision that I need into it's own folder. In my case i check them out to

/usr/share/symfony/(version)

Then I configure the ProjectConfiguration.class.php to reference whatever version is needed, using the line:

require_once '/usr/share/symfony/1.x.x/lib/autoload/sfCoreAutoload.class.php';

If I need to switch to a different symfony version, I can just change that config. That is, assuming all my code is compatible with that version