Server SQL upload
Using the StatsLab admin page to load the SQL files into MySQL can sometimes cause problems with web hosts that restrict the amount of time scripts can run or the amount of memory available to them. If you are able to load SQL files individually from the SQL File Load page, but not as a group using the Load SQL Files button on the Admin Page, you might consider using the server SQL upload script.
These instructions assume that you have StatsLab installed and functional with access to your database.
Configuring the Server SQL Upload
The StatsLab zip file contains a file called server_db_update.php.sample.
- Duplicate server_db_update.php.sample
- Rename the duplicate to "server_db_update.php"
- Edit server_db_update.php
- Change the adminpath to the same path defined in config.txt
- Validate that the league id ($lgid) is correct for your league. Usually, this is the default of 100.
- Upload server_db_update.php to your server and put it in your normal StatsLab directory.
Running the Server SQL Upload
To run the server SQL upload, you will need shell access to your webserver and permission to run PHP scripts.
- Log onto your web server
- Navigate to your StatsLab directory
- Enter the following command: "php server_db_update.php"
You should see the script begin to run, with text output as each SQL file is loaded into your database.