You must first sign up to be able to contribute.

Version 14 (modified by fabien, 11 years ago)
added Debian/Ubuntu package information

Symfony (0.6.1) installation on Ubuntu "Dapper Drake"

A Debian/Ubuntu package is also available for symfony 1.0:

$ wget
$ dpkg -i php5-symfony_1.0.2-1_all.deb

Tested on Ubuntu Dapper Drake build 20060323

Install these packages with apt:


Test if Apache and PHP are up and running typing in the browser:


You should see something like:

Apache/2.0.55 (Ubuntu) PHP/5.1.2-1ubuntu1 Server at localhost Port 80

From the command line, as root:

pear upgrade PEAR
pear channel-discover

Edit /etc/php5/cli/php.ini and change the line:

memory_limit = 8M 


memory_limit = 16M 


pear install symfony/symfony
pear install --alldeps

Using the command:

pear config-show

we find the symfony libraries have been installed in:

$php_dir/symfony/	/usr/share/php/symfony/		main libraries
$data_dir/symfony/	/usr/share/php/data/symfony/	skeleton of symfony applications, default modules and configuration
$doc_dir/symfony/	/usr/share/php/docs/symfony/	documentation

From the command line, as root:

mkdir /var/www/myproject
cd /var/www/myproject
symfony init-project myproject
symfony init-app myapp

Edit /etc/apache2/apache2.conf, and append the following at the end:

<Directory "/usr/share/php/data/symfony/web/sf">
 AllowOverride All
 Allow from All
<VirtualHost *>
  DocumentRoot "/var/www/myproject/web"
  DirectoryIndex index.php
  Alias /sf /usr/share/php/data/symfony/web/sf

  <Directory "/var/www/myproject/web">
   AllowOverride All
   Allow from All

Enable mod_rewrite with the following command:

a2enmod rewrite

Add this line to /etc/hosts (this makes map to localhost, so is needed if a DNS record for is not configured):

Edit /etc/php5/apache2/php.ini, and change the line:

magic_quotes_gpc = On


magic_quotes_gpc = Off

Restart Apache:

/etc/init.d/apache2 restart

Test the installation by typing in your browser:

You should see something like:

If you see this page, it means that the creation of your symfony project on this system was successful.