Solved

cgi problem

Posted on 2001-08-23
6
193 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
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 16

Accepted Solution

by:
maneshr earned 100 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

In this tutorial I will aim to show you how simple is making a small application in WhizBase, how to add, remove and update data in the DB. I will make a small address book application where you can add, browse, update and remove addresses. I wi…
This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
The viewer will learn how to count occurrences of each item in an array.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 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