Running Symfony

download Running Symfony

If you can't read please download the document

Transcript of Running Symfony

tobeThink!

The Definitive Guide to symfony Running SymfonyDoc. v. 0.1 - 14/04/09Wildan Maulana | wildan [at] tobethink.com

#3

Requirement

Symfony requires at least PHP 5.2. Make sure you have it installed by opening a command line and typing this command:

> php -vPHP 5.2.6-2ubuntu4 with Suhosin-Patch 0.9.6.2 (cli) (built: Oct 14 2008 20:06:32)Copyright (c) 1997-2008 The PHP GroupZend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

Symfony Installation Method

Use sandbox if you just wanna see what is symfony capable of

Use PEAR installation method, it is recommended for most people

Use Subversion (SVN) installation, it is meant to be used by advanced PHP developers, who want to take advantage of the latest patches, add features of their own, and/or contribute to the symfony project.

Btw, I prefer using SVN installation method

Installing the Sandbox

The sandbox is a simple archive of files. It contains an empty symfony project including all the required libraries (symfony, lime, Prototype with Scriptaculous, Doctrine and Propel with Phing), a default application, and basic configuration. It will work out of the box, without specific server configuration or any additional packages.

Download from : http://www.symfony-project.org/get/sf_sandbox_1_2.tgzUnpack it to the root web directory (I assume you to use sf_sandbox/ directory)

Test the installation : > php symfony -V
You will see sandbox version number :

symfony version 1.2.0 (/path/to/the/symfony/lib/dir/used/by/the/sandbox)

Try to browse the sandbox by requesting this URL :

http://localhost/sf_sandbox/web/frontend_dev.php/

Installing symfony Libraries

Using symfony PEAR package

Using Subversion (SVN)

Installing the symfony PEAR Package

Add the symfony channel to PEAR
> pear channel-discover pear.symfony-project.com

To see the libraries available in this channel, type the following:
> pear remote-list -c symfony

Now you are ready to install the latest stable version of symfony. Issue this command:

> pear install symfony/symfony

downloading symfony-1.2.0.tgz ...Starting to download symfony-1.2.0.tgz (1,283,270 bytes)...............................................................................................................................................done: 1,283,270 bytesinstall ok: channel://pear.symfony-project.com/symfony-1.2.0

Check that the installation succeeded

> symfony -Vsymfony version 1.2.0 (/path/to/the/pear/symfony/lib/dir)

Installing the symfony PEAR Package

The symfony libraries are now installed in directories as follows:$php_dir/symfony/ contains the main libraries.

$data_dir/symfony/ contains the web assets used by symfony default modules.

$doc_dir/symfony/ contains the documentation.

$test_dir/symfony/ contains symfony core unit and functional tests.

The _dir variables are part of your PEAR configuration. To see their values, type the following:> pear config-show

Checking Out symfony from the SVN Repository

# > mkdir /path/to/symfony

# > cd /path/to/symfony

# > svn checkout http://svn.symfony-project.com/tags/RELEASE_1_2_0/

> php /path/to/symfony/data/bin/symfony -V

symfony version 1.2.0 (/path/to/the/svn/symfony/lib/dir)