| 1 | ###############################################################################
|
|---|
| 2 | ## Fancy Speed Test - Easily measure your upload and download speeds
|
|---|
| 3 | ## Home Page: http://www.brandonchecketts.com/speedtest/
|
|---|
| 4 | ## Author: Brandon Checketts
|
|---|
| 5 | ## File: INSTALL
|
|---|
| 6 | ## Version: 1.1
|
|---|
| 7 | ## Date: 2006-02-06
|
|---|
| 8 | ## Purpose: Installation Instructions
|
|---|
| 9 | ###############################################################################
|
|---|
| 10 |
|
|---|
| 11 | INSTALLATION INSTRUCTIONS
|
|---|
| 12 |
|
|---|
| 13 | 1- Download speedtest.tar.gz or speedtest.zip from
|
|---|
| 14 | http://www.brandonchecketts.com/speedtest/
|
|---|
| 15 |
|
|---|
| 16 | 2- Extract the contents of the archive
|
|---|
| 17 |
|
|---|
| 18 | 3- Customize speedtest.cfg with your settings. The comments throughout the
|
|---|
| 19 | file should help explain all of the settings. At a very minimum you need
|
|---|
| 20 | to configure the base_url, upload_url, and image_path settings
|
|---|
| 21 |
|
|---|
| 22 | 4- Customize the .html files as you would like (optional):
|
|---|
| 23 | header.html - Customized "header" that you can have displayed on each
|
|---|
| 24 | page. The contents of this file are displayed before
|
|---|
| 25 | any output from the speed test scripts
|
|---|
| 26 | footer.html - Customized "footer" that will be displayed on each page
|
|---|
| 27 | welcome.html - Displayed if auto_start is off when you go to index.php
|
|---|
| 28 | unallowed.html - Page that is displayed if the user is not allowed to
|
|---|
| 29 | use the speedtest
|
|---|
| 30 | style.css - Basic style sheet - customize as needed
|
|---|
| 31 |
|
|---|
| 32 | 5- Upload all of the files to a directory on you web site
|
|---|
| 33 |
|
|---|
| 34 | 6- NOTE: upload.cgi is a Perl script that needs to be put in a directory
|
|---|
| 35 | that allows CGI's to be executed. The process for this will depend on
|
|---|
| 36 | your hosting provider. In the best case scenario, you can add the
|
|---|
| 37 | following to a .htaccess file in your directory:
|
|---|
| 38 |
|
|---|
| 39 | Options ExecCGI
|
|---|
| 40 |
|
|---|
| 41 | If this is not allowed or does not work, then most hosts provide a
|
|---|
| 42 | /cgi-bin/ directory that you should be able to use. You will need to
|
|---|
| 43 | modify the $config_file variable inside upload.cgi to point to the correct
|
|---|
| 44 | directory where your speedtest.cfg is stored.
|
|---|
| 45 |
|
|---|
| 46 | upload.cgi also relies on the Time::HiRes perl module in order to make
|
|---|
| 47 | a precise measurement of the time that it takes to upload the content.
|
|---|
| 48 | If you get an Internal Server Error (HTTP 500 Error) when trying to use
|
|---|
| 49 | upload.cgi, then you may not have Time::HiRes installed. Check your apache
|
|---|
| 50 | error log file for more detailed information. If Time::HiRes is not
|
|---|
| 51 | installed you should install it yourself. If you are on a managed hosting
|
|---|
| 52 | account, you may need to have your hosting provider install it for you.
|
|---|
| 53 |
|
|---|
| 54 | If you can't get upload.cgi to work correctly, then you can set skip_upload
|
|---|
| 55 | to 1 in the [upload] section of speedtest.cfg
|
|---|
| 56 |
|
|---|
| 57 | 7- If you plan on saving results to a databae, you will need to include the
|
|---|
| 58 | necessary fields in the [database] section of the config file. You will
|
|---|
| 59 | also need to create the database table for the results to be saved in.
|
|---|
| 60 |
|
|---|
| 61 | You can use the following SQL to create a table named "speedtest"
|
|---|
| 62 |
|
|---|
| 63 | CREATE TABLE `speedtest` (
|
|---|
| 64 | `id` int(10) unsigned NOT NULL auto_increment,
|
|---|
| 65 | `ip` int(11) NOT NULL default '0',
|
|---|
| 66 | `ip_string` varchar(15) NOT NULL default '',
|
|---|
| 67 | `timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
|
|---|
| 68 | `downspeed` varchar(15) NOT NULL default '',
|
|---|
| 69 | `upspeed` varchar(15) NOT NULL default '',
|
|---|
| 70 | PRIMARY KEY (`id`)
|
|---|
| 71 | ) ;
|
|---|
| 72 |
|
|---|
| 73 | No interface is provided in order to view the results. I'm assuming that
|
|---|
| 74 | if you have a need to view the results, they you are probably in charge
|
|---|
| 75 | of a server or network and should know how to do this.
|
|---|
| 76 |
|
|---|
| 77 | 8- That should be it. Please check http://www.brandonchecketts.com/speedtest/
|
|---|
| 78 | for the latest news and additional troubleshooting steps
|
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 | SECURITY WARNING:
|
|---|
| 82 | The speedtest.cfg file is a plain text file that could potentially be
|
|---|
| 83 | viewed through your web server. Since this file may contain a database
|
|---|
| 84 | username and password, it's important that visitors not be able to read it.
|
|---|
| 85 | You should put the following inside a .htaccess file in your directory.
|
|---|
| 86 |
|
|---|
| 87 | <Files *.cfg>
|
|---|
| 88 | Deny From All
|
|---|
| 89 | </files>
|
|---|
| 90 |
|
|---|
| 91 | Then try to read http://www.yoursite.com/speedtest/speedtest.cfg
|
|---|
| 92 | and make sure you can't read it.
|
|---|
| 93 |
|
|---|