Next: CGI Scripts on UNIX
Up: CGI Scripting
Previous: Setting up CGI Scripts
The process is essentially the same as serving up HTML pages:
- The Macintosh must be configured as a local web server.
- Microsoft Personal Web Server must be running.
- CGI scripts are then placed in in My Personal Web Site Folder (or sub-folders) on the
Maclab Hard Disk.
- The URL for the CGI script is http://macname.cs.cf.ac.uk where macname
is the name of the Macintosh you currently using. The name should be printed on a label
on the front of the machine.
NOTE:
- Make sure the CGI script works correctly before you try running over the Mac Web Server.
- IF NOT The Macintosh is likely to crash.
- MacPerl can check for a Perl script running correctly.
- (On Macintosh Only) A Perl script has to converted form perl source code to a Macintosh runnable
CGI file.
- MacPerl is used to do this.
- All supporting files (perl files, data) must be placed in the same folder as the main perl
script.
- Later as perl files get larger we may wish to (or indeed have to) split or perl program over
several files.
- Several useful Perl libraries exist to save us coding common tasks (e.g. CGI input from a
form). We will meet these shortly.
- Files are not permanently stored on a macintosh. Once the Macintosh is restarted (If the CGI
script crashes the Mac!!) the files may be lost.
- Make sure you backup regularly to floppy disk or permanent UNIX
storage
Next: CGI Scripts on UNIX
Up: CGI Scripting
Previous: Setting up CGI Scripts
Dave Marshall
9/28/2001