Getting Started



Back to Contents



First, make sure you have:

(as of June 2020)

I mention potential line ending issues for the CSV files the demo generates.
I don't think this was the problem. I think my spreadsheet software in windows was splitting my CSV columns by more than just commas and I misinterpreted the issue.

The line endings should be fine.

Windows Tutorial Video:



Linux Tutorial Video:

Start the server

(ignore if you are using your own server)
  • PHP's general instruction's for each OS For what we're doing, there's a lot you can skip.
  • Steps I took in Ubuntu Linux
    1. Install: sudo apt-get install php
    2. Verify it installed correctly: php -v should output some version information.
    3. Download and Unzip the CT viewer release somewhere.
    4. Right click and open a terminal in that new folder's location (where there is a file called index.html)
    5. Start the server with the terminal
      • If you are testing with a browser on the same computer (likely) type: php -S localhost:8000
      • If you are testing with a browser on a different computer type: php -S 0.0.0.0:8000
    6. The terminal should now say Development Server Started or something similar
    7. You can press Ctrl+C to close the server and return to the command prompt.
  • Steps I took in Windows 10
    1. Get a built version of PHP: Go to their download page.
    2. Choose the zip file (I chose the thread safe download, probably doesn't matter for our purposes)
    3. Make a folder somewhere, we'll name it testFolder. I recommend placing this in the root of the C drive, you'll navigate to it later from the command line.
    4. Place the newly downloaded zip in testFolder and extract it there.
    5. Download the release.
    6. Place the newly downloaded release zip in testFolder and extract it there.
    7. You should now have a php.exe file and a build01 folder together (along with a mess of other files/folders
    8. Open a terminal (you can type cmd into the search bar in your start menu).
    9. Navigate in the terminal to your newly created folder.
      1. You will likely want to use cd ../ until your prompt says you are in the root of the C drive.
      2. Using dir should now show you the testFolder we created.
      3. Use cd testFolder to enter the folder you created.
      4. Using dir should now show you php.exe as well as build01.
      • dir shows you a list of the files and folders in your current directory.
      • cd directory name will take you to a new folder in your current directory.
      • cd ../ will take you to your parent directry (the direction of the slash doesn't matter).
    10. Verify php installed correctly: php.exe -v should output some version information.
    11. Start the server with the terminal
      • If you are testing with a browser on the same computer (likely) type: php.exe -S localhost:8000 -t build01/ (direction of slash doesn't matter)
      • If you are testing with a browser on a different computer type: type: php.exe -S 0.0.0.0:8000 -t build01/ (direction of slash doesn't matter) Note that your firewall might request permission.
      • If you are using powershell (click the window to focus, then shift right click for the option) instead of the command prompt
        use ./php.exe… instead.
    12. The terminal should now say Development Server Started or something similar
    13. You can press Ctrl+C to close the server and return to the command prompt.

Open the Demo Page

  • Ubuntu Linux
    1. Open a web browser.
      • If you are testing with a browser on the same computer (likely) type: localhost:8000 in the URL bar
      • If you are testing with a browser on a different computer:
        1. Find the local address of the computer running the server
          1. Maybe click on the network icon in the task bar.
          2. Then click Connection Information
          3. It is likely called something like IP Address
        2. Pretend the address you found was 192.168.0.5, you would type 192.168.0.5:8000 in the other computer's browser's URL bar.
    2. You should see a white page with blue text saying Go to Viewer If you see a Resource not found or something similar, you probably opened the server in the wrong location.
  • Windows 10
    1. Open the page in a browser
      • If you are testing with a browser on the same computer (likely) type: localhost:8000 in the URL bar
      • If you are testing with a browser on a different computer:
        1. Find the local address of the computer running the server
          1. Click on the network icon in the task bar.
          2. Then click Properties on your connected network.
          3. Scroll down and find: IPv4 Address under Properties.
        2. Pretend the address you found was 192.168.0.5, you would type 192.168.0.5:8000 in the other computer's browser's URL bar.
    2. You should see a white page with blue text saying Go to Viewer. If you see a Resource not found or something similar, you probably opened the server with the wrong path, or put the build folder in the wrong spot.

Check the Demo Page

  1. Ensure each time the page is refreshed the contents of use.txt alternates between 0 and 1
  2. Ensure that each time a successful trial is completed a new data file is added to the data folder
If these things aren't happening, check the terminal running the server for errors.


This is not the server that will be running your program, you will want a remote webhost for that. The reason we are using this temporary server is because you will be making/testing many changes. It would take too long to upload small changes to your remote server for testing every time.

Remember you can always turn off the server by pressing ctrl+C in the terminal running the server.

Proceed to learn how to add images to the viewer