Solved

How do I run a perl script on win95 PC?

Posted on 1998-05-19
7
203 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

895 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

11 Experts available now in Live!

Get 1:1 Help Now