Sports PHool
For sports phanatics everywhere!

Installation Guide

Table of Contents

Requirements

You'll need a Web server with PHP v4.03+ and a MySQL database v3.23.20+. Recommended PHP is 4.03pl1 or newer and MySQL 3.23.37 or newer. PHP will need to be configured with session and MySQL support; and, you will need GD support to use the player charts. SportsPHool also requires the ADODB database abstraction library and the PHPlot library. Recent versions of these libaries are bundled with the SportsPHool application (currently ADODB 1.40 and PHPlot 4.4.6); however, you may choose to use a newer version if you wish.

SportsPHool should run regardless of whether you have transparent SID's enabled, or the users have cookies enabled. If you have difficulties with SportsPHool after installation, consult the Support resources at SportsPHool's Sourceforge site.


Installation

Upload all files in the root SportsPHool directory and the admin, assets and includes subdirectories to your Web server (do not upload the manuals subdirectory). Make sure you upload the .html, .php, .css and .js files as ASCII and the various image files as binary.

Auto-install

From your Web browser, run the setup.php script. The first step in the installation process is to choose a location for the configuration file. Since this script will hold your database variables, location can be important. (See the Security section below.) A default location of your main SportsPHool directory is suggested. If you change this value, be sure to use the full system path. Click "On to Step 2=>" and you'll be able to enter your configuration information.

See the configuration section for a full description of all the configuration variables. Various defaults will be set, but you can change any of these. Once you've entered all your configuration variables, click "Save configuration..."

If you don't see any error messages, and you see the success message, you are ready to run SportsPHool. Before doing so, DELETE SETUP.PHP FROM YOUR WEB SERVER!. Browse to your main page (for example: http://www.yourdomain.com/sportsphool/index.php), click the Register/Sign On link, log in as an existing user using the Administrator username and password you chose in setup step 2, and you're ready to roll! See the Admin Manual for instructions on running SportsPHool.

Manual install

Edit manuals/sample.config.php with the values necessary to run your application. See the configuration section for information on the variables listed in this file. Rename the file to whatever you wish and upload it to your server. Edit shared.php to point to your new configuration file (line 3, $configfile = "";).

Edit manuals/maninstall.sql and change the table names to begin with the prefix you placed in your config file. Change the username, fullname, password and email for user #1 in the INSERT statment for the {prefix}Players table. Upload the new .sql file to your server and run it on your MySQL server with:
mysql -hhost -uusername -p database < /path/to/maninstall.sql


Configuration

These are the configuration values you will need to enter


Security

The following is not a treatise on security; however, it should serve to make your Sports PHool installation less prone to hackers.

  1. Move your admin directory

    Even though the admin scripts are password-protected by SportsPHool, for greater security, you can move the admin directory; it can even reside in a different domain; although, it must still be on the same physical server. This will help defeat anyone trying to find the admin script. If you do move the admin directory, you will need to edit index.php in that directory to point to the proper location of shared.php.

  2. Run your scripts under your user ID (wrapped)

    This is a smart thing to do with all scripts, especially if you are on a shared server. Ask your Web host or consult your Web server documentation for information on running your scripts wrapped. If you are able to do this, you can change the permissions of all .php files so that only you have access to them. (Under *nix, this would be chmod 700 on all .php files.) Be sure to leave any .html, image, .css, or .js files accessibe to the Web server (e.g. chmod 707).

  3. Move config.php outside the Web tree

    You can place your configuration file outside the directory structure accessible to the Web server (e.g. to your home directory). Be sure to put the correct path in during the setup process. You can also, of course, give the config file a different name to help hide it from potential hackers.


Administration

Administration of Sports PHool is covered in the Administrator's Manual.


Formatting

The primary content of Sports PHool is generally produced in tables. This content is wrapped by two files (a header and footer). Additionally, a navigation menu file is needed, and a CSS file is optional. Header, footer and navigation files are placed in the layout subdirectory of the includes directory. The CSS file is in the assets directory. The names of the files are determined as follows:
Name of layout (from config file) + (.header/.footer/.mainnav/.mainstyle) + (.php/.css)

When creating new files, use this naming scheme. So, for example, for a format named "myformat", name your files myformat.header.php, myformat.mainnav.php, myformat.footer.php, myformat.mainstyle.css; and place them in the appropriate directories.

You can work off the existing files to create new formats, but there are a few things to keep in mind.


Playing

Information on playing Sports PHool is located in the player help files accessed from links within the main program.