![]() |
|
Snippets |
|
You may disregard this snippet if you are working with a recent version of symfony. Installing symfony is now very straightforward, even from subversion.
I had to install symfony via subversion several times and it is a pain because the paths to several key files are to be manually changed in the files coming from the svn install. I prefer the subversion install over the pear beta install because i often have to fix bugs and patch things here and there in the symfony code.
1. svn checkout the symfony code somewhere on your server
2. Choose two distinct folder accessible from php where you will put the data and lib folders. Let us call those folders «DATA» and «LIB».
3. Make symbolic links of the data and lib directories inside those two folders. The following command is to be issued from the freshly checked out symfony folder:
ln -s data «DATA»/symfony ln -s lib «LIB»/symfony
4. Put the following file inside the bin folder:
#!/bin/sh PEAR_DIR= «PAKE» #put here the path to pake.php DATA_DIR= «DATA» # here is the path to the alias of the symfony data directory SYMFONY_DIR= «LIB» # here is the path to the alias of the symfony lib directory SVN_VERSION=svn # this does not matter sed -i '' -e "s#@PEAR-DIR@#${SYMFONY_DIR}/bin#g" symfony.sh #sed -i '' -e "s#@PEAR-DIR@#${PEAR_DIR}#g" symfony.bat sed -i '' -e "s#@PEAR-DIR@#${PEAR_DIR}#g" -e "s#@DATA-DIR@#${DATA_DIR}#g" -e "s#@SYMFONY-VERSION@#${SVN_VERSION}#g" symfony.php sed -i '' -e "s#@PEAR-DIR@#${PEAR_DIR}#g" -e "s#@DATA-DIR@#${DATA_DIR}#g" -e "s#@SYMFONY-VERSION@#${SVN_VERSION}#g" ../../lib/pear.php
5. Execute that file. You should be ready to use symfony
ln commands could be incorporated inside the script.bin directory was moved inside the data directory. The new version of the file above should work as well as before.