Installation

System Requirements

The following programs are needed to use phpTest:

I've tested phpTest on both Windows and Linux, with IIS and Apache on Windows and with Apache on Linux. Other webservers probably will work with little or no modifications.

Getting phpTest

The phpTest homepage is located at http://www.resynthesize.com/code/phptest.php. Both win32 zip packages and unix tarballs are available:

Download and extract one of the files to somewhere underneath your webserver document root. You can take a look at the INSTALL file that comes with the distribution for quick install instructions. For more detailed instructions, read on

CVS access

I've setup CVS access for phpTest on savannah.gnu.org. I check in code about once a day when I'm actively working on phpTest. You can browse the CVS via cvsweb at http://savannah.gnu.org/cgi-bin/viewcvs/phptest/phptest/. You can access the code anonymously via a cvs client with the following commands:

cvs
        -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/phptest
        login

cvs -z3
        -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/phptest co
        phptest

Mailing Lists

There are some mailing lists set up to facilitate the discussion of phpTest. phpTest users is designed for end users who want to discuss the software. The url for this list to subscibe and view archives is http://mail.freesoftware.fsf.org/mailman/listinfo/phptest-users. phpTest developers is for people working on or interested in contributing to phpTest. The url for this list is http://mail.freesoftware.fsf.org/mailman/listinfo/phptest-devel

Setting up the phpTest database

Before we can actually start using phpTest, we have to dump the data into a MySQL database. I recommend that you create a new database for phpTest, but that is not strictly necessary, as long as there aren't any naming collisions with the phpTest tables and the tables already in your database. To create a new database, login to the MySQL console with a user with appropriate permissions. Then type the following:

CREATE DATABASE
        phptest;

Press enter. You should see the following output:

Query OK, 1 row
        affected (0.00 secs)

Now, let's dump the data into the database. The distribution comes with a file called phptest.sql. This file contains all of the information we need to put into the database. Type the following to do this. (note: if you look at phptest.sql in a text editor, you'll notice a lot of strange characters. Don't worry, those are just images stored as text.)

mysql -u username -p password database_name
        < phptest.sql

If the command runs successfully, you will not see any output and simply receive a shell prompt. Note that you have to substitute username, password, and database_name with appropriate values. If you followed the steps above to create a new database, the database_name would be phptest. The user that you use must have create and insert grants.

The database is now ready to go, we just need to edit some variables to get everything working.

Configuration

Before we can use phpTest for the first time, we need to set up some configuration variables. Open the file h.inc.php. Go down the list and set each variable with an appopriate value

Variables look like this:

define('VARIABLE_NAME',
	    'VALUE');

Following is some more information about each config variable.

The rest of the configuration is done from within phpTest. Once you login as an administrative user (discussed later), click on the 'Configuration' menu item to edit other configuration variables.

Following is a list of some configuration variables that require additional explanation:

The rest of the variables are the html colors for the look of the test. You can modify them if you want but it's not required.

Making sure everything works

Open up the index.php page on your server. You should be greeted with a login screen. The initial admin login/password is admin/123456. There is also a guest account: guest/guest. Login with the admin account and change your password. Click on a few menu items and verify everything is working. There are a few tests and questions to play around with. If everything is working here, congratulations! If not, see the troubleshooting section later.