Solved

How do I run a perl script on win95 PC?

Posted on 1998-05-19
7
206 Views
Last Modified: 2013-12-25
Hi.

I want to learn how to run perl scripts on my server!

I use win95. And have a directory called c:\perl with the perl.exe in.

Then in the cgi-bin directory of the server, I have made a new directory with the actual script in. called C:\progra~1\xitami\cgi-bin\fruitbbs
In that directory I have the perl script, wich starts with the line #!/usr/bin/perl - my Q now is; what do I do to make the script executet. When I open my htmlpage and press the button for calling the script, I get a view of the script instead.
0
Comment
Question by:CATT
  • 3
  • 3
7 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 50 total points
ID: 1828841
1. the directory in which the perlscript is placed should be a virtual directory that is executable.
2. you have to let your webserver know that files with the extension .pl should be executed using perl.exe. How you do that depends on your server. If you use MS Personal webserver you have to edit the registry:
in:
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W3Svc\Parameters\Script Map]

add:
.pl
with the value
C:\perl\bin\perl.exe %s

0
 

Author Comment

by:CATT
ID: 1828842
Great, thats what we needed to know, only problem now is that we do not use MS personal webserver, but the Xitami server. Do you know how to do it in that server? (could it be something in the mime editor?)
i'm willing to increase the points if thats what needed, as the script should be up and running within the next 8 days or so. So we really dont have that much time.

0
 
LVL 5

Expert Comment

by:icd
ID: 1828843
If you RTFM you can find the answer to this question. :-)

Look at http://www.imatix.com/html/xitami/index13.htm#c_5

which states:-

Quick hints on installing Perl for Windows    

Install Perl in some directory, and make sure the PATH includes the Perl bin directory. Define the PERLLIB environment variable to include the Perl lib directory
(this lets Perl find its library files). The command 'perl' must work when you're in a DOS box in the cgi-bin directory, and you must be able to run your Perl CGI
scripts using 'perl xxxx'. Then, check that the header of the CGI scripts start with '#! perl'.


Why does my Perl CGI not run?    

This is a check list that may help you.

   1.Did you install Perl? (Yes, some people forget this.)
   2.Can you run the CGI script from the DOS command line using the syntax 'perl scriptname'?
   3.Can you run the standard http://127.0.0.1/cgi-bin/testcgi program?
   4.Can you run a simple script like this:

     #! perl
     print "Hello World!";

   5.Does your CGI script start with '#! perl'?
   6.If you're running a 16-bit Perl, make sure Xitami is not in a subdirectory with long filenames (E.g. C:\Program Files\Xitami) or the CGI won't work. Under
     NT, forget 16-bit Perls completely.
   7.Finally, set the cgi:debug and server:debug options to 1. This will leave you with a couple of files in the temp directory- tempxxxx.cgo and header.log - that
     contain the actual CGI output and the headers sent back to the browser.
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 
LVL 5

Expert Comment

by:icd
ID: 1828844
If this works, please remember who 'answered' you question for you :-) (sorry sybe).

By the way sybe, how come I can't see your profile?

0
 
LVL 28

Expert Comment

by:sybe
ID: 1828845
icd: I don't know why you can't see my profile, i can see it :). And i can see yours.


0
 
LVL 5

Expert Comment

by:icd
ID: 1828846
sybe. I can see your profile now, must have been a glitch.

It appears that if an 'expert' has commented on a question they are no longer expected to pay to see the answer. That's a good change by EE.
0
 
LVL 28

Expert Comment

by:sybe
ID: 1828847
I noticed that too, it's a good thing !
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
change home folder path 4 56
Need help to rewrite script 3 96
Need some help with powershell script 5 55
Gotten a bit confused with my rather simple PowerShell script 3 29
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to count occurrences of each item in an array.

820 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