Solved

cgi problem

Posted on 2001-08-23
6
197 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
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 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Edit Registry Key via Batch File 8 63
Powershell / new-object PSObject rows 2 346
Questions about this React unit test 4 60
Need some help with powershell script 5 48
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…
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
The viewer will learn how to count occurrences of each item in an array.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

776 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