?
Solved

How do I run a perl script on win95 PC?

Posted on 1998-05-19
7
Medium Priority
?
210 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 100 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
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
Suggested Courses

765 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