Web Programming, Linux System Administation, and Entrepreneurship in Athens Georgia

Open Source Speedtest

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

43 Comments

  1. Brandon

    @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

    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

    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

    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

    How is the log file extension? txt?

    Thanks

  6. dave

    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. Brooks Hollar

    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

    @Brooks – The license is GNU GPLv3.

    Thanks,
    Brandon

  9. David

    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

    @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

    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

    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

    wow,

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

    Including template customization.

    Thanks again.

  14. dmitry

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

  15. dmitry

    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

    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. franclevy

    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

  18. harker

    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

  19. D

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

  20. Denie Nataprawira

    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 🙂

  21. Prothero

    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.

  22. Prothero

    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.

  23. TP

    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.

  24. Brandon

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

  25. Eduardo Mejia

    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.

  26. Hemanshu

    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

  27. BSD

    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

  28. Dagner

    Brandon,

    Do you know what would cause this error?

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

  29. Firas

    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!

  30. Sonny

    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

  31. Colin

    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

  32. Simon Roberts

    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

  33. Kai

    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

  34. Simon Roberts

    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

  35. amanda

    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

  36. Arief K

    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?

  37. Martin Theiler

    Hi,

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

    Thank You for this fine script!
    Martin

  38. Domas

    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?

  39. Domas

    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

  40. Karl

    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.

  41. Shastri

    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

  42. Nathan

    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″

  43. Vedant

    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

Leave a Reply

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

© 2024 Brandon Checketts

Theme by Anders NorenUp ↑