in reply to Perl & Personal Web Server
The trick is to convince PWS that .cgi (or .pl) means Perl. This requires editing the registry. (The ActiveState installer is supposed to do this, but I've found it to be less than reliable.)
Here's what you need to do:
You should now be able to execute CGIs.
To edit the registry, do the following:
The kicker is that if you get these steps wrong and set up the scriptmap with a bad .cgi string, you'll need to uninstall and reinstall PWS. (PWS extracts the scriptmap settings and caches them in its MetaBase, and if a bad string gets in there, you can be SOL with PWS, at least in Win98. The MetaBase doesn't have good editing tools.)
(Update: Oh yeah, you need to use the Personal Web Manager control set set "execute" permission on each directory that you want to run CGIs from.)
Here's test.cgi, a handy script to drop into C:\InetPub\scripts\ for testing. Once you can hit http://localhost/scripts/test.cgi, you're on the air.
#!/usr/bin/perl -w print "Content-type: text/html\n\n"; print "<html><body><pre>"; foreach $key ( sort keys %ENV ) { print $key, ": ", $ENV{$key}, "\n"; } print "</pre></body></html>\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Perl & Personal Web Server
by mkmcconn (Chaplain) on Mar 02, 2001 at 07:10 UTC | |
by orkysoft (Friar) on Mar 02, 2001 at 09:51 UTC | |
by Anonymous Monk on Mar 02, 2001 at 10:46 UTC | |
|
Re: Re: Perl & Personal Web Server
by Lexicon (Chaplain) on Mar 02, 2001 at 14:50 UTC | |
by Anonymous Monk on Mar 02, 2001 at 21:25 UTC |