Friday, September 18, 2009

Install symfony PHP-Java bridge

Installing the symfony PEAR Package

The symfony PEAR package contains the symfony libraries and all its dependencies. It also contains a script that will extend your CLI to include the symfony command.

The first step to install it is to add the symfony channel to PEAR, by issuing this command:

> 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.1.0.tgz ...
Starting to download symfony-1.1.0.tgz (1,283,270 bytes)
.................................................................
.................................................................
.............done: 1,283,270 bytes
install ok: channel://pear.symfony-project.com/symfony-1.1.0

That's it. The symfony files and CLI are installed. Check that the installation succeeded by calling the new symfony command line, asking for the version number:

> symfony -V

symfony version 1.1.0 (/path/to/the/pear/symfony/lib/dir)

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

For production servers, or when PEAR is not an option, you can download the latest version of the symfony libraries directly from the symfony Subversion repository by requesting a checkout:

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

The symfony command, available only for PEAR installations, is a call to the /path/to/symfony/data/bin/symfony script. So the following would be the equivalent to the symfony -V command for an SVN installation:

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

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

If you chose an SVN installation, you probably already have an existing symfony project. For this project to make use of the symfony files, you need to change the path defined in the project's lib/ProjectConfiguration.class.php file, as follows:


http://php-java-bridge.sourceforge.net/pjb/installation.php

./configure --with-java=/usr/java/jdk1.5.0_13,/usr/java/jdk1.5.0_13/jre --with-php-config=/usr/local/shri/php/bin/php-config

0 comments:

Post a Comment