Installation

There are a few pieces of tools and software needed throughout the development of the application. First we shall setup the environment for coding and testing. We shall from here on assume that you have access to a working installation of a web server with PHP and possibilly a MySQL database server. The first thing to do is install Prado and some testing tools.

Download and Install Prado

The minimum requirement by PRADO is that the Web server support PHP 5. For the Time Tracker sample application, you need Prado version 3.1 or greater.

Installation of PRADO mainly involves downloading and unpacking.

  1. Go to pradosoft.com to grab the latest version of PRADO.
  2. Unpack the PRADO release file to a Web-accessible directory.

You should at least first check that the demos bundled with the Prado distribution are working. See the quickstart tutorial for further instructions on running the demos.

Help! Nothing is working!

If you encounter problems in downloading, unpacking and running the demo applications, please visit the forum to seek help. Please do a search on the forum first or read the PDF version of the quickstart. The friendly and wonderful people at the forum can better assist you if you can provide as much detail regarding your problem. You should include in your post your server configuration details, the steps you took to reproduce your problem, and any error messages encountered.

Create a new Prado application

Prado is bundled with a command line tool to create the necessary directory structure to run a hello world application. The command tool prado-cli.php is a php script and can be found in the prado/framework/ directory. To create a new application, go to your document root and type the following command in console.

php prado/framework/prado-cli.php -t -c time-tracker
Tip: For linux and OS X environments, you can chmod u+x prado-cli.php and change the first line of prado-cli.php to the location of your PHP command line interpreter. Now, you may call the script from command line like an executable.

A directory named time-tracker will be created containing the following. document_root/time-tracker/assets/ document_root/time-tracker/index.php document_root/time-tracker/protected/ document_root/time-tracker/protected/.htaccess document_root/time-tracker/protected/pages/ document_root/time-tracker/protected/pages/Home.page document_root/time-tracker/protected/runtime/

The time-tracker directory is where we are going to put all our code for the Time Tracker application. Since -t was passed into the prado-cli.php script, unit and functional test skeletons are also created.

document_root/time-tracker/tests/ document_root/time-tracker/tests/unit/ document_root/time-tracker/tests/functional/ document_root/time-tracker/tests/unit.php document_root/time-tracker/tests/functional.php