|go ahead... be a heretic|
Re: Perl & Personal Web Serverby dws (Chancellor)
|on Mar 02, 2001 at 04:58 UTC||Need Help??|
PWS executes Perl CGIs just fine. I do a lot of development using PWS on both Win98 and NT, then upload to my ISP (which runs Apache on FreeBSD). It's a reasonable development environment.
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.