?
Solved

personal web server and perl cgi does not work ??

Posted on 2000-02-13
6
Medium Priority
?
404 Views
Last Modified: 2013-12-25
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









0
Comment
Question by:snuffel
  • 2
  • 2
  • 2
6 Comments
 
LVL 1

Expert Comment

by:Kenny
ID: 2521725
Rather than using
   #!c:/usr/local/bin/perl -w

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

0
 
LVL 1

Expert Comment

by:Kenny
ID: 2521759
ooops....that was supposed to be like this :

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

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



0
 
LVL 7

Accepted Solution

by:
faster earned 800 total points
ID: 2521768
First, the line

#!c:/usr/local/bin/perl -w

is not needed (though does not hurt).  It is for unix only.

What you need to do is config the registry for web server:
======================================
Associate the extension for your scripts with the
    appropriate interpreter in the script map for IIS. This is
    under the Registry key HKEY_LOCAL_SYSTEM, with the
    sub-key
    ``System\CurrentControlSet\Services\W3SVC\Parameters\Script
    Map''. Many people map two extensions: one to perl.exe
    (for example, .pl) and another to PerlIS.dll (for example,
    .plx). Note that mapping an extension in the script map
    is not the same as associating the extension in Explorer.
    Use the full paths to the executable files in the script
    map.
======================================
normally you only need to associate .pl to perl.exe, I remember that it should be something like this:

key:
..pl

value:
\perl\perl.exe %1

check perl WIN32 document on web server installation if you still have problem:

http://www.activestate.com/ActivePerl/docs/Perl-Win32/perlwin32faq6.html#How_do_I_configure_IIS_3_0_or_lo

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:snuffel
ID: 2528136
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.
0
 

Author Comment

by:snuffel
ID: 2528142
Thank you very much for your effort.
0
 
LVL 7

Expert Comment

by:faster
ID: 2529468
PWS is only a minimum http server, of course apache is better.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question