Preparing for your first script

Before we start creating scripts we must first set up our document correctly. This is important as it will prevent any frustrations later.

The video below will demonstrate how to do this.


Use the above video to help you create the html template.

Debugging - the internal server error

Debugging scripts that are running on a server can be difficult but if you follow the steps outlined below you will minimise the number of times you see the following in your browser:

Internal server error

Debugging Steps

  1. Ensure that you have set-up your server-side script properly using the above video
  2. Check for syntax errors in Idle before transferring the script to the server using the Run -> Check Module option in the menu

    checking for syntax errors in idle

  3. If you are on a Unix based system (Mac OS X for example) ensure that your script is executable. The video below show you how to do this.


Use the above video to make the script executable if you are on a Unix based system e.g. Mac OS X.

Writing your first script

Now that you have set-up the server-side script template and have some understanding of the problems we can encounter it is time to write our first script.