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.
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.
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.
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
These are the configuration values you will need to enter
Hours of DST offset: the number of hours by which times should be adjusted during DST, e.g. -1 or 1. For manual installs, multiply the number of hours by 3600 to get the total number of seconds difference.
A few notes on DST: if using DST, you should adjust it for the season during which your sports will be played. For example, the NFL begins during DST in the US and ends during Standard Time. So the system should view DST as beginning in October with an adjustment of -1 and when setting up the NFL games, you would use -4 as the default offset from GMT. This will give you a time offset of -4 for all games prior to 10/28 and -5 for all games on or after 10/28. See the Admin Manual for more information on how DST affects the games. (If it all sounds too complicated, just don't use it.)
Database name: the name of the database where you will be storing SportsPHool information.
Note: if the username/password combo above does not allow creation of databases, you will need to manually create the database (or have your ISP create it for you) before running the setup script. The username/password combo you use for the database must have create/drop table access as well as normal select/insert/delete/update access.
The following is not a treatise on security; however, it should serve to make your Sports PHool installation less prone to hackers.
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
.
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).
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 of Sports PHool is covered in the Administrator's Manual.
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.
writelocal.js
file.
class
attributes for alternating rows,
and various other classes are specified for special
output. Any style added to this content will have to come
from a CSS file. See the default.mainstyle.css file for
comments on how to produce CSS for the main content. You
can, of course, style the header, footer and mainnav in
any way you like.
Information on playing Sports PHool is located in the player help files accessed from links within the main program.