Solved

How do I run a perl script on win95 PC?

Posted on 1998-05-19
7
202 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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
This article will show, step by step, how to integrate R code into a R Sweave document
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now