Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

cgi problem

Posted on 2001-08-23
6
Medium Priority
?
204 Views
Last Modified: 2013-12-25
the problem that i have is that im new to perl/cgi and i want to know like how in asp we have pws to run and test the scripts how do i do that in case of cgi could u let me know how do i interface it my os is that of windows 98 and i want a cgi server to install and run it on my personal system and how do i use cgi
0
Comment
Question by:spyyder
[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
6 Comments
 

Expert Comment

by:MichaelSonny
ID: 6421170
you can use the pws also! you only have to install the ActivePerl V.... ! You can download it from activestate.com!

You also have to change the properties in your webroot to Execute Scripts!

.... after doing that! Everything will work if you use the extension *.plx! It is also possible to change the fileextension to *.cgi but you have to use IIS!
0
 
LVL 16

Expert Comment

by:maneshr
ID: 6422873
spyyder,

".. want to know like how in asp we have pws to  run and test the scripts how do i do that in case of cgi could u let me know how do i interface it my  os is that of windows 98 and i want a cgi server to install and run it on my personal system and how  do i use cgi "

So if i understand you correctly, you have a Windows 98 system with PWS running on it.

You are currently using ASP to write CGI scripts and would like to use PERL for CGI development.

If the above is correct, then you are just 2 steps away from writing your first PERL script.

The first step, as inidicated by MichaelSonny, would be to use Active State PERL.

You can download Active State PERL for Windows from..

http://downloads.activestate.com/ActivePerl/Windows/5.005/Intel/

Select the PERL version that you want to use.

Let me know after you have finished the above, so that i can post the 2nd step which is to configue PERL to work with PWS.

Also let me know the version of PWS that you are using.

Thanks,
0
 
LVL 1

Expert Comment

by:paintbrush
ID: 6462282
Hello spyyder,

Here's how to do what you want on windows 98:

1. Download Apache Server and install (its free) you can find it at: http://www.apache.org/

2. Download ActiveState Perl (this is perl for windows).  Its free and you can find it at http://www.activestate.com.  Then install it.

3. There should be some instructions for setting up a cgi directory on your apache server that will point to your directory where your perl scripts will be.

When all is installed you should be able to start up your Apache server with START->Programs->Apache->Start

You will need to establish a home page directory and an html page to be your home page somewhere on your hard drive and the home page directory needs to be referenced in the apache configuration file prior to startup.

You will need to reference 127.0.0.1  (this is the local loopback) in your browser to get to your home page.

It took me about 2 hours to set all this up and get it working but it does indeed work as I have a windows 98 machine where I have done this.  Your perl scripts may require a shebang line at the top to work.

                     Here is a sample perl script:

                    You may need to specify on the top line the (shebang) #! c:\perl\bin\perl.exe
 on the top line of your perl script to tell the script what program is to be used to execute it.

                     # This perl script will say hello
                        use CGI qw(:standard);


                     $time = time;
                     $date = localtime;

                     $org = "*** Your Organization ***";
                     $dept = "*** Your Dept ****";

                     print_htm_top();

                     print_htm_bot();
                         
                     exit;

                     sub print_htm_top {

                     #if(defined(IIS_MODE)) { print "HTTP/1.0 200 OK\n"; }
 
                     print <<"(END PRINT HTML)";
                     <HTML>
                     <HEAD>
                     <TITLE>Request for Information - Hello -
                     $org</TITLE>
                     </HEAD>
                     <BODY BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#52188C">

                     <CENTER>
                     <H3>
                     <center>
                     Hello Hello Hello Hello
                     <br>
                     Are your there? Are you there? Are you there?
                     <P>


                     (END PRINT HTML)
                           
                        }



                     sub print_htm_bot {

                     print <<"(END PRINT HTML)";
                     </CENTER>
                     </BODY>
                     </HTML>
                     (END PRINT HTML)

                     }

Good Luck!     -   paintbrush
                       
0
Docker-Compose to Simplify Multi-Container Builds

Our veteran DevOps Author takes you through how to build a multi-container environment, managed with a single utility in order to simplify your deployments.

 
LVL 16

Accepted Solution

by:
maneshr earned 400 total points
ID: 6628529
spyyder,

Did you get the solution you were looking for?

What solution, if any, did you use??

Please let us know.

If you have already found the solution on your own or this question has become obsolete, please go ahead and delete this question.

Thanks,
0
 
LVL 16

Expert Comment

by:maneshr
ID: 6654403
spyyder,

Did you get the solution you were looking for??

What solution, if any, did you use??

Pl. let us know.

NOTE: if you have found a solution on your own or if this question has become obsolete, please delete  it and free up your points.

Thanks,
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6699240
Last login was August.  This has apparently been abandoned, thus finalized.
Moondancer
Community Support MOderator @ Experts Exchange
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

730 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