I'm not guaranteeing anything, but it works
I suggest unzipping the http server software
under your Internet directory, and your perl software either under a Perl directory or a
programming directory - for security reasons don't put it under your Web data directory.
- Follow the directions for installing both sets
for information on installing Perl. Don't move these files once you have installed Perl as
it sets up Registry entries - and it adds the Perl\bin directory to the path (under
- create a directory that will be the top of
your data directory for your .html files - like \pub or \public.
You should have an HTTPS applet under Control Panel. Click on
this and set your \pub (or whatever you called it) directory for the start of the Data
- Under Services - start the EMWAC https service
(you may wish to change the Startup parameters to make it automatic)
------ that was the easy part -------
I am assuming that you can create HTML forms,
or at least edit them. If not - may I suggest a very good tutorial.
Most info on Perl scripts and cgi-enabling is
for Unix boxes - so here is the elusive info you will need.
the #!/usr/local/bin/perl line at the top of
the script is what tells the Unix command shell where to find the Perl.exe file.
This doesn't work under NT! Instead - do the following:
- You must FileAssociate .pl files to perl.exe
under your Perl\bin directory. (note that you might have other perl.exe files scattered
around - if unsure look in the System applet under Control Panel and look at the Path
under System variables)
- make sure that the line containing
push(@INC,"/pub/cgi-bin/"); is correct -ie. full path name.
(/pub/cgi-bin/ is the directory under your DataDirectory where you want to store your
cgi-scripts). you may need to push(@INC,"/other/directories/"); if you
"require" scripts stored elsewhere (I haven't tested this yet).
Note that you don't need to have anything except your cgi-scripts here. The other .pl
files can happily sit in perl\5.001\lib or whereever.
- I would suggest grabbing a copy of cgi-lib.pl and sticking it in your cgi-bin directory (as
noted in the above tutorial on HTML forms)
- in your HTML form - call the script as
<form method="POST" action="http://www.your.server.name/cgi-bin/your_script.pl">
I suggest using the POST method - it's more
secure and handles more information than GET.
www.your.server.name = the machine you are
putting this on.
/cgi-bin/ = the directory path to where your
cgi-scripts are located (not including the Data Directory root directory). (ie. mine is
\pub\cgi-bin but as \pub is the Data Directory (as specified in the https applet under
Control Panel) I only need \cgi-bin.
your_script.pl = whatever you have called
a hacker could reformat your harddrive - or worse!!
The dreaded "Document contains no
data" message? :-(
This could be for a number of reasons, like
It's in the docs, but I'll mention it here
Make sure that the System has at least read and execute access to your scripts.
It'll need write as well if you are making changes to files etc.
It's probably just as easy to give the system full access to the data directory tree
(including scripts directory) as default, and if you really want to tighten security,
tighten access in the places where you want it tightened. (Note the system will also have
to be able to execute perl.exe [which won't be under the data directory tree]).
I think that most other things can be nutted
out from reading the docs but if you run into any walls - or you think I need to add or
change something here - let me know.