Installation
This page explains step by step a complete installation with all needed requirements for running the php4 version of Propel.
Prerequisites
- @PREFIX@ is assumed to be the base directory where to install the libraries (e.g. /usr/local)
Compiling
Php5
Php5 is required for Propel's generator framework as this is currently not backported. However, a php5 commandline executable which fits our needs isn't that hard to compile since only support for xml and one of the database drivers has to be compiled into the executable. Download the lates php5 version from http://www.php.net/get/php-5.0.3.tar.bz2/from/a/mirror.
The following example is configured with mysql as database driver:
$ tar xvjf php-5.0.3.tar.bz2 [Output truncated] $ cd php-5.0.3 $ ./configure > --prefix=@PREFIX@ > --disable-cgi > --enable-cli > --with-config-file-path=@PREFIY@/etc > --with-config-file=@PREFIX@etc/php.ini > --enable-mbstring > --enable-mbregex > --with-dom=/usr/include/libxml2 > --with-mysql=/usr [Output truncated] $ make [Output truncated] $ mv sapi/cli/php @PREFIX@/bin/php5 $ cp php.ini-dist @PREFIX@/etc/php.ini
Installing
Phing
Download Phing from http://phing.tigris.org/files/documents/995/17885/phing-2.0.0.tar.gz then proceed as follows:
$ tar xvzf phing-2.0.0.tar.gz [Output truncated] $ mv phing-2.0.0 @PREFIX@/phing
Creole / Propel
Creole / Propel need to be ckecked out from cvs:
$ cd @PREFIX@ $ cvs -d :pserver:anoncvs@cvs.tigris.org:/cvs login $ cvs -d :pserver:anoncvs@cvs.tigris.org:/cvs checkout -rcreole-php4-1_0_0beta creole $ cvs -d :pserver:anoncvs@cvs.tigris.org:/cvs checkout -rpropel-php4-1_1_0beta propel
Configuring
Phing
Phing must be setup correctly to be aware of our php5 installation, its installation path and required classpaths from Creole and Propel. This can be easily done with a small shell script that is placed into a directory listed in the environment variable $PATH (e.g. /usr/local/bin):
$ cat > /usr/local/bin/phing << EOF
> #!/bin/bash
>
> BASEDIR="@PREFIX@"
>
> export PHING_HOME="\${BASEDIR}/phing"
> export PHP_COMMAND="\${BASEDIR}/bin/php5"
> export PHP_CLASSPATH="\${PHING_HOME}/classes:\${BASEDIR}/creole/creole/classes:
\${BASEDIR}/propel/propel/classes:\${BASEDIR}/propel/propel-generator/classes"
>
> \${PHING_HOME}/bin/phing "\$@"
>
> EOF
$ chmod 755 /usr/local/bin/phing
Test installation:
$ phing -v Phing version 2.0.0
If Phing has been set up correctly, executing the phing shell script should give you the above output.
Propel
See Getting Started
