Link to home
Start Free TrialLog in
Avatar of snuffel
snuffel

asked on

personal web server and perl cgi does not work ??

I have windows 95 with Personal Web server and ActiveState Perl. All the latest versions. I first loaded active Perl and then PWS then installed Active Perl again.

If i start my browser and type in :
http://<MyLocalHost>/cgi-bin/test.pl
the browser says :
" Web site found, Waiting for reply..."
If i do Control Alt Delete the task list includes perl.

My feeling is that it starts perl but does not pass the script as an argument. Since perl does not return when you do not pass an argument it "Hangs".

Before i posted this question i looked at all the helpfull question being asked that where simular to mine.
I added to my script :
#!c:/usr/local/bin/perl -w
(also tried #!\usr\local\bin\perl -w
and #!c:\usr\local\bin\perl -w)

Then i added the regestry entry .pl and associated it with :
c:\usr\bin\local\perl.exe %s %s

Plus i associated the .pl extension in MS explorer (using %1 %*). I can call perl scripts from the explorer.

Then i copied perl.exe into the cgi-bin and called :
http://<MyLocalHost>/cgi-bin/perl test.pl

That worked. I can also start .html files without problem. The only thing that does not work is :
http://<MyLocalHost>/cgi-bin/test.pl

My question is why does this not work :
http://<MyLocalHost>/cgi-bin/test.pl









Avatar of Kenny
Kenny
Flag of Malaysia image

Rather than using
   #!c:/usr/local/bin/perl -w

Try using :
   <MyLocalHost>/cgi-bin/perl
   #!<MyLocalHost>/cgi-bin/perl -w

ooops....that was supposed to be like this :

Rather than using
   #!c:/usr/local/bin/perl -w

Try using :
   #!<MyLocalHost>/cgi-bin/perl -w



ASKER CERTIFIED SOLUTION
Avatar of faster
faster

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of snuffel
snuffel

ASKER

THanks for all the responds. I think that "faster" had the right answer but i did not test it. What i did instead is: Uninstalled the PWS and installed the Apache Web Server for Win42 from :
www.apache.org.

It works like a champ. No problems. Great documentation.

Forget about the personal web server. Apache is the way to go. Apache for W95 , NT. It is very easy to set up. It run for me within 5 minutes.

After installing it make those 2 entry's to the httpd.conf file in the directory where you install the apache server.

ServerName <Your Computers ID>
ScriptInterpreterSource registry

THen add the .pl to your regestry :
HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/W3SVC/Parameters/Scrip Map/

Right Click with the mouse and add String Value -> ".pl"
Double CLick on the Entry and make Value data equal to <PATH TO PERL> %s %s
Example : c:\usr3\perl\bin\Perl.exe %s %s

Now start Apache and start your browser and type in your Computer ID. It gives you the default APACHE HTML. Find all your directories in the APACHE Directory.

Let me know if you have any problems. This is great really.
Avatar of snuffel

ASKER

Thank you very much for your effort.
PWS is only a minimum http server, of course apache is better.