Installing and Configuring Run
Run is an application that is pretty straightforward to set up and use. The installation and configuration of Run can be done in three simple steps:
NOTE: If you are already using Run and just want to upgrade to a newer version please read the Upgrading Run section.
Configure Run
Before you do anything, go to directory within Run-VersionNumber (for example, Run-0.8) directory called system. There you will find file configuration.php. Open that file in any text editor and make the relevant changes. Detailed instructions on what to do where, are in the file itself, but here's the rundown of a few general configuration conventions and what you'll be setting up:
- General conventions. Make sure to change only the values of the variables, not the names of the variables themselves, semicolons at the ends of lines, or double-quotes enclosing the values (with the exception of null values, where there should be no double-quotes at all) - leave those as they are, otherwise Run will not function properly.
If you left the database name where you will store Run data unchanged (Run), then you will only have to change the three values for mysql_connect() function.
For example, if the name of your mysql server is foobar, change the $mysqlservername value from localhost to foobar.
If you do not want to assign any value to a variable, use null without double-quotes. You might want to use null value for $mysqlpassword, for example, if you are running Run only locally. However, it doesn't have to be stressed that this poses a big security issue, so be careful.
- Error reporting. With $errorrreporting variable you assign the level of error reporting for all PHP code in Run. In Run this value is used to set the value of PHP function error_reporting(). If you are troubleshooting code, you will probably want to use E_ALL which will report all errors, warnings, notices, etc. Otherwise you will probably want to set this to E_WARNING. For more details see PHP documentation.
The default value of $errorreporting is E_ALL.
- MySQL connection. Variables $mysqlservername, $mysqlusername and $mysqlpassword are used to set the values of PHP function mysql_connect( [string server [, string username [, strung password]]]) which PHP uses to connect to MySQL server.
With $mysqlservername you set the name of your MySQL server. If both web server and MySQL server are one and the same computer, value of this variable can be localhost Also, if you are using MySQL on a custom port, servername should be followed by a colon and port number. For example, localhost:3200. The default value of $mysqlservername is localhost.
With $mysqlusername you set the username you use to login and use MySQL. The default value of $mysqlusername is root (you'll almost definitely have to change that).
With $mysqlpassword you set the password you use to login to MySQL with your MySQL username. The default value of $mysqlpassword is null (again, you'll definitely have to change that).
- Select the database. $mysqldbname variable sets the value of PHP function mysql_db_name() which PHP uses to use the tables within the database you choose. Set this value to whatever you will name your database where you will store Run data. By default the database name is named Run and therefore this value is Run. It is recommended that you leave value of this variable as it is.
- Shoes table. Set variable $mysqltableshoes to whatever you will name your shoes table in the Run database. This is the table where shoes information for all runners is stored. By default the name of the table is Shoes and therefore this value is Shoes. It is recommended to leave this name as it is: do not change this name unless you have a really good reason to do so.
- Runners table. Set variable $mysqlTableRunners to whatever you will name your table in the Run database where information about Runners is stored. By default the name of the table is Runners and therefore this value is Runners. It is recommended to leave this name as it is: do not change this name unless you have a really good reason to do so.
- Running Logs table. Set variable $mysqlTableRunningLogs to whatever you will name your running logs table in the Run database. This is the table where information about runs for all runners is stored. By default the name of the table is RunningLogs and therefore this value is RunningLogs. It is recommended to leave this name as it is: do not change this name unless you have a really good reason to do so.
Copy Run Files to Any Web Server Public Directory
When your server meets all of the software conditions and after you have made all neccessary changes to the system/configuration.php file, copy the contents of the Run-VersionNumber (for example, Run-0.8) directory to a directory that you can access with your web browser.
Create Run database and tables
You'll have to set at least one more important thing before you start using Run: create MySQL database and tables.
- Run database. If someone else is hosting you web site (for example, your ISP), it is most likely that someone else will create a database for you, and provide you with database access information (name of the MySQL server, username, password) along with the database creation.
However, if you can or have to create your own databases, you can create the Run database named Run by executing the following command from the command line:
mysqladmin create database Run
NOTE: Although you can name your database as you like it, it is recommended that you leave the name at its default value, as all statements in this document assume that the name of the database is Run. However, if you decide to change the name of the database, you will also have to change the Run configuration file accordingly. For more information see first step (Configure Run) of this section (Installing and configuring Run).
- Run tables. To create all tables in the Run database that are neccessary for Run to work, point your browser to the location where you have copied Run on your web server and add /Install/CleanInstall08.php to the URL. This will execute the script that will create all neccessary Run tables in your database.
After you have executed the script, and if Run works (which means that you can log in as administrator, add runners, log in as one of the runners and add shoes, runs, etc.) you can remove the Install directory altogether.
First time Run users
If you are using Run for the first time, read this.