Symfony is a free MVC framework written in PHP 5. As a framework, it facilitates and accelerates the development of Internet and Intranet websites and applications.
> wget http://sf-to.org/1.4/check.php
> php check_configuration.php
********************************
* *
* symfony requirements check *
* *
********************************
php.ini used by PHP: /etc/php5/cli/php.ini
** WARNING **
* The PHP CLI can use a different php.ini file
* than the one used with your web server.
* If this is the case, please launch this
* utility from your web server.
** WARNING **
** Mandatory requirements **
OK PHP version is at least 5.2.4 (5.2.6-1+lenny8)** Optional checks **
OK PDO is installed
[[WARNING]] PDO has some drivers installed: : FAILED
*** Install PDO drivers (mandatory for Propel and Doctrine) ***
OK PHP-XML module is installed
[[WARNING]] XSL module is installed: FAILED
*** Install and enable the XSL module (recommended for Propel) ***
OK The token_get_all()function is available
OK The mb_strlen()function is available
OK The iconv()function is available
OK The utf8_decode() is available
OK The posix_isatty() is available
[[WARNING]] A PHP accelerator is installed: FAILED
*** Install a PHP accelerator like APC (highly recommended) ***
[[WARNING]] php.ini has short_open_tag set to off: FAILED
*** Set it to off in php.ini ***
[[WARNING]] php.ini has magic_quotes_gpc set to off: FAILED
*** Set it to off in php.ini ***
OK php.ini has register_globals set to off
OK php.ini has session.auto_start set to off
OK PHP version is not 5.2.9
Clearly, there are some small issues. Let’s fix them now:
> php check_configuration.php
********************************
* *
* symfony requirements check *
* *
********************************
php.ini used by PHP: /etc/php5/cli/php.ini
** WARNING **
* The PHP CLI can use a different php.ini file
* than the one used with your web server.
* If this is the case, please launch this
* utility from your web server.
** WARNING **
** Mandatory requirements **
OK PHP version is at least 5.2.4 (5.2.6-1+lenny8)** Optional checks **
OK PDO is installed
OK PDO has some drivers installed: mysql
OK PHP-XML module is installed
OK XSL module is installed
OK The token_get_all()function is available
OK The mb_strlen()function is available
OK The iconv()function is available
OK The utf8_decode() is available
OK The posix_isatty() is available
OK A PHP accelerator is installed
OK php.ini has short_open_tag set to off
OK php.ini has magic_quotes_gpc set to off
OK php.ini has register_globals set to off
OK php.ini has session.auto_start set to off
OK PHP version is not 5.2.9
There are several solutions to install Symfony. I personally chose SVN, but PEAR would have been just as good, or even the Sandbox (all-in-one). For this, I need to have SVN installed:
1
aptitude install subversion
Next, we will create a space to place Symfony:
1
2
3
cd /usr/share
svn checkout http://svn.symfony-project.com/branches/1.4/
mv 1.4 symfony
Then we’ll verify that everything is installed correctly:
1
2
symfony/data/bin/symfony -V
symfony version 1.4.5-DEV (/usr/share/symfony/lib)