Open Source Speedtest

Fancy Speed Test


  • Upload and download bandwidth tests
  • Interactive user experience
  • Very customizable
  • Saves results in a database
  • Restrict to particular networks / IP Addresses
  • Customizable look
  • Customizable maximum file sizes

Sample Speedtest

Example test here

Download Fancy Speed Test Version 1.1 (.zip format)
speedtest-1.1.tar.gz Fancy Speed Test Version 1.1 (.tar.gz format)

Installation Instructions

Detailed installation instructions can viewed online. The same instructions are available inside the downloadable archive named INSTALL


Speed test results seem accurate up to about 10 Mbps.  At speeds higher than that, the large chunks of data start to slow down the JavaScript engine on the client.


  • The download portion of this test was loosely based on an old speedtest by Gambit Design
  • The upload portion of the test was loosely based on MegaUpload

95 thoughts on “Open Source Speedtest”

  1. Awesome software with easy setup and excellent operation.

    Thanks for all your work on this project.

    Still haven’t got the upload portion of it working, but haven’t spent much time on it.


  2. Hi there,

    I’m trying to install this software but I keep getting the internal server error message even though I think I’ve done everything in your instructions. Is there a common dummies mistake I’m making or an obvious pointer I’m missing?

  3. Hello developer,

    thank you for nice work.. It’s very helpful for my project. I encountered some installation problem.before make it work.

    I use Apache 2.2 / AppServ 2.5.7. At the first installation, Fancy speed test keep error 500 during executon. Then, I have to install Active Perl ( using the installation guide line of After correctly installtion Active Perl, it works very nicely. // Kittivud.

  4. Hi all,

    It is an awesome piece of software…I got mine working in few minutes (both download and upload). Cool, 😀

    – Wing Loon

  5. With my old Xitami+ActivePerl server, I must multiply upload time tv_interval by 5000 to get the correct Upload Speed measured.

  6. still not working, the browser keep saying error 500. here’s my apache log
    [Fri Jul 06 16:04:55 2007] [error] [client] Bareword found where operator expected at E:/web/speedtest/cgi-bin/upload.cgi line 19, near “/web/speedtest”\r, referer:
    [Fri Jul 06 16:04:55 2007] [error] [client] \t(Missing operator before peedtest?)\r, referer:
    [Fri Jul 06 16:04:55 2007] [error] [client] syntax error at E:/web/speedtest/cgi-bin/upload.cgi line 19, near “E:”\r, referer:
    [Fri Jul 06 16:04:55 2007] [error] [client] Execution of E:/web/speedtest/cgi-bin/upload.cgi aborted due to compilation errors.\r, referer:

  7. Download test works fine. Upload bar graph goes to about 80% mark and then hangs.

    Running it on a Linux Apache 2 system.

    Any ideas?


  8. I’ve got the script working on the download side. However my upload doesn’t register and keeps causing:
    “Division by zero in /home/XXXXX/public_html/test/results.php” on line 115 & 110 and my upspeed only registers as “undefined” when the auto size option is enabled. This causes the Upload to use the max 5000kps test and register no results.

    I have all permissions set properly and am running upload.cgi out my my cgi-bin and I have the Time::HiRes perl module installed and enabled on my server. I have the upload.cgi and speedtest.cfg edited properly. I know this script works, I’ve seen it many times online and it’s fully functional. I just don’t know why it’s not working on either of my hosted servers (same provider though).

    I am on a hosted linux server with PHP 5.2.4 and Time::HiRes version 1.9708. Just curious if anyone else had the same issue and found a resolution. Much appreciated if anyone would share.

  9. Dennis,

    Do you have access to your Apache error log? That usually contains some
    details that might help pinpoint the problem.

    Brandon Checketts

  10. I followed the instructions here for installation of SpeedTest onto a Ubuntu 7.10 server running Apache2 and PHP5 with Time::HiRes installed.
    When I attempt to access the bandwidth test I continue receiving 500’s.

    I was concerned that the files: header.html, footer.html, & welcome.html DO NOT EXIST!
    I thought those missing files could cause the 500’s so I created those files but still no go….

    Orignally ‘upload.cgi’ was located in ‘/var/www/web1/web/speedtest/’.
    While in this location if I ran ‘perl -x upload.cgi’ I would receive no errors no nothing- had to CTRL-C to return to the CL.

    So I decided re-locate ‘upload.cgi’ to /var/www/web1/cgi-bin/’.

    Below is my setting within ‘upload.cgi’ pointing to ‘speedtest.cfg’.
    [code]my $config_file = “/var/www/web1/web/speedtest/speedtest.cfg”;[/code]

    My settings within ‘speedtest.cfg” are:

    [code]base_url =

    upload_url =

    image_path = /var/www/web1/web/speedtest/

    logfile /var/log/speedtest.log

    I have also created the MySQL db using PHPMyAdmin and added the table.

    Defined the db name and credentials within ‘speedtest.cfg’ but I continue to receive 500’s.
    Likewise with ‘upload.cgi’ living in ‘cgi-bin’ when I run ‘perl -x upload.cgi’ no errors no response- CTRL-C to access CL again.

    If anyone could help me with some incite or possibly tell me what is the leading cause of failure I would appreciate it greatly.


  11. I found the problem!

    After spending too much time running commands in perl and receiving absolutely no errors I decided something a bit more bold was required to make this app work on my server!

    I relocated the speedtest files from the dir ‘speedtest’ into the root web-werver dir- this due to the fact that virtually ALL CGI’s returned 500’s from the dir ‘speedtest, found that out with a hello world.cgi’
    Next I had to rename some files which were incorrectly named:
    ‘results.php > speedtestresults.php’
    ‘download.php > speedtestdownload.php’

    In all a pretty cool little tool, I wonder is Brandon is actually testing people’s abilities with the mis-named files?

    Thank you for the script!


  12. I installed the speedtest onto a Centos web sever running Apache 2 and PHP5, but I could not get the upload portion to run. I put the upload.cgi file in the cgi-bin, ran the test, and only got the upload.cgi text file in the web browser. For some reason the system does not want to execute the upload.cgi file.

    Here is what I changed in speedtest.cfg

    base_url = http:///speedtest/

    upload_url = http://cgi-bin/upload.cgi

    image_path = /speedtest/

    This is what I changed in upload.cgi:

    my $config_file = “/speedtest/speedtest.cfg”;

    Can someone please give me some suggestions on what I could be doing wrong.

    Thank You!

  13. John,

    It sounds like your web server isn’t configured to execute the programs in the cgi-bin directory, and is instead just displaying their contents. Their are many ways to fix this, depending on how your web server is configured. The simplest would be to to create a .htaccess file with the contents:

    Options +ExecCGI

    That may or may not be allowed, depending on how tight permissions on the web server are. In some cases you may have to modify the apache configuration file, and add something like this:

    <directory “/path/to/your/speedtest”>
    Options +ExecCGI

    Brandon Checketts

  14. I added the following to my apache configuarion file:

    Options +ExecCGI

    However, I am still getting the same result; What else do you think it could be? Thanks for your help.

  15. I am getting the following errors:
    [Tue Dec 04 10:48:51 2007] [error] [client] PHP Warning: Division by zero in /home/web/htdocs/speedtest/download.php on line 76, referer:
    [Tue Dec 04 10:48:54 2007] [error] [client] PHP Warning: Division by zero in /home/web/htdocs/speedtest/download.php on line 76, referer:
    [Tue Dec 04 10:48:54 2007] [error] [client] ModSecurity: Output filter: Response body too large (over limit of 524288, total length not known). [hostname “”] [uri “/speedtest/download.php?downspeed=771.4&downtime=1.062&downsize=100&auto_size=1&uptime=0.00&upsize=51.412109375&upspeed=undefined”] [unique_id “1YiXtUHdQwcAAEvxP@8AAAAN”]

  16. Hi

    This is a nice tool – I installed and it seems to be working – but somehow the upload speed cannot be correct, I ran a couple of times on my LAN and get speeds between 500-600 – would be good if that is the case, but I don’t think so -what could be the reason for this problem?

    I don’t get any errors in apache error log nor from your tool.

    any help is appreciated.

  17. Brandon,

    Do you know what would cause this error?

    A critical error occurred: Unable to read configuration file: /speedtest/speedtest.cfg

  18. Hai

    I am getting error in apache error log

    PHP Notice: ob_flush(): failed to flush buffer. No buffer to flush. in /var/www/html/download.php on line 108.

  19. Hi, i’m trying to get your speedtest up and running, however the timing seems to be off.
    I have the upload amount set to 2000 kb, but the elapsed time shows me 4 ms, basically giving me insane upload speeds. I added some debug info to upload.cgi, and it gave me this:

    2008 004 16:37:57 Starting to read
    2008 004 16:37:57 len is 2125370
    2008 004 16:37:57 Starttime: 1199572677 576099
    2008 004 16:37:57 Endtime: 1199572677 580885
    2008 004 16:37:57 Done reading
    2008 004 16:37:57 $upload_size is 2075.556640625
    2008 004 16:37:57 $bytes_read is 2125370
    2008 004 16:37:57 $elapsed is 0.004786
    2008 004 16:37:57 $upload_speed is 3469380.09

    any idea how i can solve this?

    Running on CentOS4 with LiteSpeed btw.

  20. Dear John,

    I experienced the same problem of your (upload cgi cannot execute). I use Apache 2.2 and php 5 (window xp). To solve my problem, I am needed that to install ‘Active Perl’. You can find software and installation guid from After correctly installtion Active Perl, My speed test works nicely. Thank you Brandon for this software.

  21. Hi,

    I am trying to run your application on IIS 5.1. The download test runs smootly, but when I attempt to run the upload test I keep receiving a Cgi timeout message. it doesn’t help if I increase the timeout period for Cgi.

    Can I run this application on IIS at all or it can be run only on Apache?

    I am using Active Perl and PHP5.

    Thanks in advance

  22. Hi,

    Thank you for the quick response.I took your advice and ran the application on apache 2.2. But, the following message keeps showing:

    Strict Standards: Creating default object from empty value in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\phptest\common.php on line 26

    Should I change something in the code?


  23. Everything is working fine expect that the progress bars during uploading/downloading aren’t shown. pretty_version is set to 1 and I can see the progress bars if I use your example speed test server.

    No error are shows in apache log.

    Thanks in advance

  24. Very nice script. I copied the files and setup apache and it worked. Of coarse I needed to setup file rights, install php, etc…
    I verified the script gets accurate data by comparing against several other internet speed tests.

    Would be nice if I could get it to work across the LAN (100Mb and Gb) but I needed it to test broadband connectivity to our headquarters via IPSEC. For this it works great!!


  25. I’m trying to install this, but at the end only shows the content of upload.cgi:

    ## Fancy Speed Test – Easily measure your upload and download speeds
    ## Home Page:
    ## Author: Brandon Checketts
    ## File: upload.cgi
    ## Version: 1.1
    ## Date: 2006-02-06
    ## Purpose: Time the upload progress, forward to results.php (or back to
    ## download.php if using auto_size)

    use strict;
    use File::Basename; ## for dirname();
    use Time::HiRes qw(gettimeofday tv_interval);

    Any ideas? Thanks

  26. This sounds like a cool tool, but when I run I get
    HTTP Error 405 – The HTTP verb used to access this page is not allowed.
    Internet Information Services (IIS)

    I have tried several things but no luck.

  27. Yodi, It looks like an HTTP 405 Error is your server complaining that the POST request is not recognized? I’m familiar with IIS, but this page has a little information about script mapping, which sound like it is the cause:

    An HTTP POST is a pretty common operation, and I’m not sure why it would not work by default.

  28. @carlos – You need to configure your web server to execute upload.cgi rather than just displaying it. The process for this varies widely by web server. Apache is usually configured semi-correctly, but IIS or other servers might take some tweaking

  29. I found this website by accident and tested the Speed-Test.
    I got comepletely wrong speed-values (too high).


  30. i’ve install speed test, but i’ve error:
    couldn’t create child process: 720003: upload.cgi
    can somebody help me with this error?

  31. Great tool. I very much appreciate the time that it took to create this. Thanks for an excellent tool.

  32. Hey,

    First of all, thanks for creating this application, was looking for something basic like this.

    However, i have a problem executing the CGI script, it times out…

    When i start the test the download bar reaches 100%, the upload bar reaches 100% but nothing loads after that, except for a CGI timeout error after some time.

    I’m running IIS 6.0 with basicaly every script extension installed and working. Any idea what causes the timeout?

    Thanks in advance

  33. Jelle,

    I’ve never had an IIS server to test on, but I would suggest looking for any log files generated by the server to see if they hint at what the problem might be.

  34. The server encountered an internal error and was unable to complete your request.

    Error message:
    couldn’t create child process: 720003: upload.cgi

    If you think this is a server error,

    why am I getting this error. can you help me to sort this out.

    appreciate your help and support.

  35. Hi there,

    I have tried to run perl on upload.cgi and I’m getting below mentioned error, any thoughts.

    \htdocs\speedtest>perl -x upload.cgi
    Can’t locate in @INC (@INC contains: .) at upload.cgi line 12.
    BEGIN failed–compilation aborted at upload.cgi line 12.

  36. Sanjay,

    The problem is probably the path available for perl. Typically the modules are in some directory like c:\perl\modules, but your path only includes the current directory (@INC contains: .) . You could research how to modify the path, or just add something before the ‘use strict’ line that adds the correct directory to your modules to @INC:

    push($inc, “c:\perl\modules”);

    (Note that you may have to double escape the backslashes)

  37. My upload speed comes out wrong. It starts doing the upload and stops half way through and goes to the results :S

  38. This is an excellent script! working on trying to automate a call to it so that I can track daily statistics of internet speed. Will post if I figure out a way to do it.

  39. Question: What determines the file size used for testing?
    We are mainly using this test on our wireless network.
    It seems the file size changes in direct proportion to signal strenght. Possibly adjusting for packet loss is this the case?

  40. @George:

    It does a small initial download/upload test to get a rough idea of the speed. Then it calculates the file sizes to use so that the ‘real’ test will take around 16 seconds.

    The initial download/upload size is set to 50k down and 10k up, although that can be changed in the config file.

    I don’t have any magical reason for using those sizes/times. I think I did some trial and error when trying to decide on some appropriate numbers, and it seems that it has worked out well.

    I was using this initially in a wireless network as well, so it should be pretty well suited for you.

  41. I managed to install and run the script flawlessly, however I observed my download results were inaccurate (too low when compared with other speed test script installed on the same server). Upload results seems accurate.

    I’ve checked the config file but find no clue where to tweak the script. Help is much appreciated. TIA.
    what could be the reason

  42. @dodi – I’ve generally had pretty accurate results for speeds up to about 5 Mbps. Between 5-15 Mbps is in the right ballpark, and faster than that, the browser has trouble keeping up, so it reports it as slower than it really is.

  43. So, I have two of these that where active and working – but for some reason – it has just stopped working.
    It seems to just stop on the download.php page – My MAC shows no errors – but my PC shows errors on line 933 – object expected, line 1758 – object expected, and line 1764 char5, object expected. This is the case on two different servers.
    Looking at the source – it looks like it is the payload.js file that the browser is expecting something from. Any ideas on this? Like some sort of PHP update issues? Nothing in the apache error log –

  44. Just a quick update – I have found that the header.html file will cause some weird issues if there is bad coding in it – so BeWare!!! – May help someone else – I was trying to get some tables to work in it – but it may have freaked out some other code.

Leave a Reply

Your email address will not be published. Required fields are marked *