Open Source Speedtest

Posted on December 13th, 2006 in by Brandon

Fancy Speed Test

Features

  • 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

speedtest-1.1.zip 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

Troubleshooting

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.

Credits

  • 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 Responses to 'Open Source Speedtest'

Subscribe to comments with RSS or TrackBack to 'Open Source Speedtest'.

  1. Brandon said,

    on November 14th, 2008 at 9:06 pm

    @Rob – I would guess that if there is a javascript syntax error anywhere in the header, it stops the javascript from continuing to execute on the rest of the page, which would obviously break the speedtest. Good catch.

  2. dodi said,

    on November 16th, 2008 at 1:01 pm

    Brandon,
    you’re right, I’ve got no problem with download results for speed below 1Mbps (typical ADSL access), only the test in LAN (at office) give inaccurate download readings.

    If somebody know a way to overcome this, do share it here.

  3. BORIN said,

    on December 15th, 2008 at 9:11 pm

    Hi,

    I install the speed test in my local server Fedora Core 4 with Perl 5.8.x. and Apache/2.0.54. I could not get the upload work and got the 500 Internal Server Error.

    Please advice on this issue.

    Regards,
    Borin

  4. BORIN said,

    on January 5th, 2009 at 8:30 pm

    Hi all,

    Could anyone help me to get this script working? So far, I could not get it work at all on my server.

    Regards,
    Borin

  5. Yves said,

    on March 4th, 2009 at 2:40 pm

    How is the log file extension? txt?

    Thanks

  6. dave said,

    on March 26th, 2009 at 7:08 pm

    Works great!

    Ran into a couple minor issues:
    Base URL needs to end in “/”. If you put “http://foo.com/bar”, a script directs your browser to “http://foo.com/barresults.php”

    Someone above said this was a problem with misnamed files – it’s not, it’s how a script handled the base URL when trying to get the properly named file. Renaming the file will work, until you move speedtest to a folder with a different name.


  7. on April 13th, 2009 at 10:55 am

    Howdy Brandon. I’m checking out your Speedtest app and it’s exactly what I’m looking for! I know you’re intending for this to be open source, but is there a particular license you assume is in effect here?

    I’m interested in using it at work for commercial purposes.

    Thanks!
    -ab

  8. Brandon said,

    on April 13th, 2009 at 3:08 pm

    @Brooks – The license is GNU GPLv3.

    Thanks,
    Brandon

  9. David said,

    on April 24th, 2009 at 9:31 am

    Is there anything special with the payload.js file?

    That seems to be the reason why it is inaccurate. I’m trying to fix that but I can not get around the payload.js file every time I try to change it, the progress bar then stops working.

    Is the payload.js like jquery, mootools, prototype etc. js library or something?

    Or is it just some random file you base64ed?

    Thanks

  10. Brandon said,

    on April 24th, 2009 at 9:44 am

    @David,

    It has been a while since I have written this, but IIRC for some reason the file has to have slashes at the end of each line. It just uses raw javascript, no 3rd party libraries. If I was to rewrite it today (something I keep intending to do, but never have time to), I would do it with jquery.

  11. edgood1 said,

    on July 24th, 2009 at 1:24 pm

    I second the fact that the results are not accurate at all…. if you disable the upload test, your download speed with appear to multiply by 10.

    something is very off with the calculations here.

  12. rick said,

    on August 28th, 2009 at 11:45 am

    Hello I’m giving this a try on the following:
    WinXP Pro
    IIS 5.1
    ActivePerl 5.10.1 Build 1006
    PHP 5.3.0

    I Unzipped speedtest-1.1.zip into the default c:\Inetpub\ directory.
    Configured base_url and upload_url with http://127.0.0.1/speedtest & http://127.0.0.1/speedtest/upload.cgi
    Configured directory for scripts & executables

    After beginning download from index.php by clicking the ‘start test’ button it hangs with message ‘Calculating appropriate file sizes for testing’. Then it eventually times out.

    Does anyone have a working IIS configuration?

  13. Seb est la said,

    on October 13th, 2009 at 12:34 pm

    wow,

    That script works very well.
    I’ve installed it in less than 45min.

    Including template customization.

    Thanks again.

  14. dmitry said,

    on November 17th, 2009 at 6:59 am

    Big thanks! After a lot of googling I found this speedtest and realized that it completely covered my needs.

  15. dmitry said,

    on November 18th, 2009 at 3:59 am

    Fancy Speed Test returns slightly higher results than real if gzip compresion enabled on web server. That is no problem, placing “BrowserMatch .* no-gzip” resolves the issue.

  16. ab rocket said,

    on December 29th, 2009 at 3:24 pm

    if you’re running XAMPP on Windows, as was my case, be sure to replace: “#!/usr/bin/perl -w
    at the the top of your UPLOAD.CGI file with:
    #!”D:\xampp\perl\bin\perl.exe”


  17. on April 29th, 2010 at 11:01 am

    […] Open Source Speed Test Tool – Fancy Speed Test […]

  18. franclevy said,

    on September 20th, 2010 at 2:37 pm

    Very good tool just what I was looking for. After some setbacks with the execution of upload.cgi this runs smoothly, but I do not give any speed increase, but if the download speed.
    The test file I worked without problems tiempo.cgi
    I have a server with
    Centos – Apache2 – PHP5 – Pelras installed
    Copy the apache error log

    [Mon Sep 20 15:19:07 2010] [error] [client Mi IP] PHP Warning: Division by zero in /Uno/test/pruebas/speedtest/results.php on line 110, referer: http://mi_sitio/pruebas/speedtest//download.php
    [Mon Sep 20 15:19:07 2010] [error] [client MI IP] PHP Warning: Division by zero in /Uno/test/pruebas/speedtest/results.php on line 110, referer: http://mi_sitio/pruebas/speedtest//download.php
    [Mon Sep 20 15:19:07 2010] [error] [client MI IP] PHP Warning: Division by zero in /Uno/test/pruebas/speedtest/results.php on line 110, referer: http://mi_sitio/pruebas/speedtest//download.php
    [Mon Sep 20 15:19:07 2010] [error] [client MI IP] PHP Warning: Division by zero in /Uno/test/pruebas/speedtest/results.php on line 110, referer: http://mi_sitio/pruebas/speedtest//download.php
    [Mon Sep 20 15:19:07 2010] [error] [client MI IP] PHP Warning: Division by zero in /Uno/test/pruebas/speedtest/results.php on line 110, referer: http://mi_sitio/pruebas/speedtest//download.php
    [Mon Sep 20 15:19:07 2010] [error] [client MI IP] PHP Warning: Division by zero in /Uno/test/pruebas/speedtest/results.php on line 115, referer: http://mi_sitio/pruebas/speedtest//download.php

  19. harker said,

    on September 22nd, 2010 at 3:37 am

    this is awesome,
    its runing and working..
    but how to make sure that this is accurate ?
    i try many times and the result show randomly

  20. D said,

    on September 27th, 2010 at 4:59 pm

    Can you post an example for using the ‘Allow’ and ‘Disallow’ sections of the config file? Thanks, -D


  21. on December 17th, 2010 at 7:07 am

    1). EDIT /etc/httpd/conf/httpd.conf :

    ScriptAlias /speedtest/ “/home/speedtest/public_html/”
    Alias /speedtest-image/ “/home/speedtest/public_html/”

    Options +ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all

    2). EDIT /home/speedtest/public_html/speedtest.cfg:
    image_path = /speedtest-image/

    *Restart “httpd” , test your site 🙂

  22. Prothero said,

    on January 30th, 2011 at 5:50 pm

    What are the units of the speed? Is it Bits/second or Bytes/second. The only way it is consistent with my own download times is if it is in Bits/second. Would you verify this for me?

    I also assume that it downloads and uploads to my computer.

    Thanks.

  23. Prothero said,

    on January 30th, 2011 at 5:52 pm

    I got it working on http://earthednet.org/ but couldn’t get it working on http://es.earthednet.org/
    It gave me a page not found error. I did the speedtest.cfg file appropriately. Maybe there’s a bug.

  24. TP said,

    on February 3rd, 2011 at 11:29 am

    No matter what I try, I can’t get this to work.

    The closest I have come is the download.php notifying ‘Calculating appropriate file sizes for testing’, then returning to the Start page without printing any results. This is with all configs pointing to the speedtest directory.

    If I put upload.cgi in a separate directory and change the httpd.conf and speedtest.cfg files to reflect, I get 403 forbidden. The download test looks like it has run, as the URL in the 403 error page shows ‘…/cgi-bin/?downspeed=7186&downtime=0.114&downsize=100&auto_size=1’

    In either case, other CGI scripts run just fine from this same CGI directory on my XP box running Apache2.2.

  25. Brandon said,

    on February 25th, 2011 at 4:09 pm

    @Prothero, Yes, like most bandwidth speeds, this is measured in bits per second.

  26. Eduardo Mejia said,

    on June 3rd, 2011 at 12:43 pm

    When I try [Start Test] I can see the application working and calculating the value for both criteria (upload/download).

    but when the process of calculate is over, appears the next message:
    “Fatal error: Call to undefined function mysql_connect() in /usr/local/www/apache22/data/speedtest/results.php on line 22”

    I see the script in this file and it seems ok, even when I try to do a direct connection to my data base I have no problems with it.

    mysql -u $user -p$password -h $host $db_name.
    Then I can’t finish my testing 🙁

    Best regards.

  27. Hemanshu said,

    on June 15th, 2011 at 6:17 am

    Upload speed is not accurate.
    When i start test, download speed checks works fine but in upload speed it went till half stage and then suddenly hits the end.
    I am talking about progress bar, it reaches to half stage and then to 100% stage.
    always it suggests upload speed more than 3 times the download speed.
    in ADSL connection this is not possible. I think there is some problem in scripting/time calculation.

    Hemanshu

  28. BSD said,

    on June 18th, 2011 at 6:41 am

    Hi Brandon nice script, I got it working on my ubuntu 10.04 workstation 🙂 inside my private network, is there a way for me to disallow 5 or more IP address from my LAN in using the speed test? Thanks

  29. Dagner said,

    on July 7th, 2011 at 10:55 am

    Brandon,

    Do you know what would cause this error?

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

  30. Firas said,

    on July 10th, 2011 at 6:21 am

    Thanks for the great tool. Is it possible to also add latency (and if possible traceroute) to the output results? I am trying to find a tool that would help me troubleshoot latency problems of my clients.

    Thanks again!

  31. Sonny said,

    on July 26th, 2011 at 1:40 am

    Hi very useful script

    When I set, skip_upload = 1
    I get, Warning: Division by zero in /home/…download.php on line 66

    any idea why? thanks for making this available.

    SB

  32. Colin said,

    on September 23rd, 2011 at 5:20 pm

    Lovely bit of software, just what I needed for my server to help find out why friends abroad seemed to be experiencing slow downloads.
    Server running Centos 6, Apache 2.2, PHP 5.3, just copied software into place, set up config file and it worked, upload and download tests both working fine.

    Thank You
    Colin


  33. on October 3rd, 2011 at 6:09 am

    Worked great for me, converted it to a XOOPS module, found the permission otherwise know as forbidden would occur cause of the enabling of Execution of CGI in the .htaccess.

    Made a few nice changed, check out speedtest 1.01 beta for XOOPS based on this open source http://www.chronolabs.coop/articles/xoops-modules/speedtest-1-01/3,134,-1.html

    Download: http://bin.chronolabs.coop/xoops2.5_speedtest_1.01.zip
    Sourceforge: http://sourceforge.net/projects/chronolabs/files/XOOPS/Modules/speedtest/xoops2.5_speedtest_1.01.zip/download

  34. Kai said,

    on October 4th, 2011 at 6:32 pm

    I’m trying to get this awesome script running, but still have Error 500 on upload.cgi 🙁
    I installed “sudo perl -MCPAN -e install Time::HiRes” already.
    Maybe you can help me to get this running?
    Twitter @seokai or mail from obove.

    Thanks a lot
    Kai


  35. on January 26th, 2012 at 2:02 am

    […] Brandon Checketts » Open Source Speedtest – January 26th ( tags: speedtest performance monitoring app ) […]


  36. on February 26th, 2012 at 10:00 pm

    Works Great for me, this is brandett checkit speed test 1.03 for XOOPS version 1.03

    Article: http://www.chronolabs.coop/articles/Xoops-Modules/SpeedTest-1.03/134.html

    Download: http://bin.chronolabs.coop/xoops2.5_speedtest_1.03.zip

  37. amanda said,

    on May 16th, 2012 at 7:54 pm

    I’ve got the same problem as TP (Feb, 3, 2011).
    DL and UL seems working but after the test finishes, it jumps to my main website (www.mypage.com) instead of showing the results page.

    Any help would be greatly appreciated!
    amanda

  38. Arief K said,

    on December 5th, 2013 at 10:07 pm

    I can get the measuring result displayed but there’re 6 lines of “Warning: Creating default object from empty value in /var/htdocs/speedtest/v2/common.php on line 26”
    Is there anything I should do?


  39. on July 20th, 2014 at 7:19 am

    Hi,

    I’ve just installed the speedtest and after some testing it´s running well.

    Thank You for this fine script!
    Martin

  40. Domas said,

    on October 7th, 2014 at 11:31 pm

    Hello,
    when i push “Start Test” i get
    Calculating appropriate file sizes for testing

    {‘general’}->{‘image_paest” meurlr.gif”funcinpwoulypd_tdisplaload_bar” /> splaupload_bar” /> splaupremud_b

    What i did wrong?

  41. Domas said,

    on October 13th, 2014 at 4:11 am

    Hello,
    after i push “Start test” i get :

    Calculating appropriate file sizes for testing

    {‘general’}->{‘image_paest” meurlr.gif”funcinpwoulypd_tdisplaload_bar” /> splaupload_bar” /> splaupremud_b

  42. Karl said,

    on October 26th, 2014 at 1:35 pm

    Anyone having the same problem as TP or amanda, check permissions on your upload.cgi. It’s probably 644 default, change to 755. You may also have to add a couple lines to the .htaccess file, RewriteEngine On and Options +FollowSymLinks.

  43. Shastri said,

    on November 7th, 2014 at 10:08 am

    Hi,

    Great project..I was able to set up successfully, however I am trying to pass a variable (customer name) from the welcome screen to the result page but it is not working. I used POST, Session, Javascript. Nothing works. Can you assist me?

    Thnks

  44. Nathan said,

    on January 6th, 2015 at 1:53 pm

    I’m getting the same error as Airef K
    Please advise!

    6 lines of “Warning: Creating default object from empty value in /var/htdocs/speedtest/v2/common.php on line 26″

  45. Vedant said,

    on August 11th, 2015 at 4:17 am

    Great and accurate speedtest, but safari has issue of while redirecting through GET request and it doesnt come up with download.php page. Instead after you begin test it does the testing and comes up with final result page.

    That means it kind of skips displaying download page.

    any suggestions how to fix it?

    Many Thanks

Post a comment