PHPonTrax
[ class tree: PHPonTrax ] [ index: PHPonTrax ] [ all elements ]
Prev Next
PHP On Trax

PHP On Trax

Rapid Application Development Made Easy

Table of Contents

Welcome To Trax!

What Is Trax?

Trax is an open source software package designed to speed the development of the type of web site that is built around a database. Trax is a PHP and Apache port of Ruby on Rails, which is well described in the book Agile Web Development with Rails.

Trax uses the popular Model-View-Controller design pattern. It helps you develop web sites faster by automating the common development steps, and by using naming conventions instead of explicit configuration. This is done in a way that permits you to do further customization by hand where the standard Trax methods don't meet your needs.


Who Is Trax For?

Trax is designed to be used by programmers who have a good working knowledge of object-oriented programming in general and PHP 5 in particular; of relational database management systems and SQL; and of Apache server configuration. Trax does not attempt to address the needs of unskilled users.


What Do I Need To Run Trax?

Trax requires PHP 5, the Apache web server and a relational DBMS such as MySQL or another DBMS supported by the PEAR DB class. Apache must be configured to allow Trax to use mod_rewrite and to support PHP 5 with mod_php. PHP 5 must also be available from the command line.

To verify that PHP 5 is available from the command line, type:

$ php --version
PHP 5.0.4 (cli) (built: Nov  8 2005 08:27:12)
...
The version must be at least 5.0.3

To verify that PHP 5 is available as an Apache module, create the one-line program below and install it somewhere in the Apache document root:

<?php phpinfo() ?>
When you browse to this program, you will see a page that describes the Apache PHP installation (if any).


How Do I Install Trax?

Download the Trax PEAR-installable package into a convenient working directory, then install it with the command:

$ pear install -o PHPonTrax-release.tgz
You will probably need to run this command as the superuser. The -o switch tells PEAR to also load any required PEAR modules that are not already installed. The pear config-show command will show you where your PEAR library is installed:
$ pear config-show
CONFIGURATION:
==============
PEAR executables directory     bin_dir   ...
PEAR documentation directory   doc_dir   ...
PEAR directory                 php_dir   ...
PEAR data directory            data_dir  ...
PEAR test directory            test_dir  ...
...

Trax stores its documentation in doc_dir/PHPonTrax/doc/ in HTML. To read the documentation, browse to file://doc_dir/PHPonTrax/doc/index.html

You should verify correct installation by changing to directory test_dir/PHPonTrax/test/ and running the command php runtests.php. All tests should complete without failure. Also verify that the trax command is available from the command line.

If PHP was installed on your system without PEAR, install it.

If you are installing Trax on a shared host where you do not have authorization to install in the system PEAR module library, the best approach is to build a local PEAR copy and install Trax there.


Prev   Next
Examples From The Rails Book

Documentation generated on Thu, 04 May 2006 19:46:54 -0600 by phpDocumentor 1.3.0RC4