Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • Last Modified:

cgi problem

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
spyyder
Asked:
spyyder
1 Solution
 
MichaelSonnyCommented:
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
 
maneshrCommented:
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
 
paintbrushCommented:
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
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
maneshrCommented:
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
 
maneshrCommented:
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
 
MoondancerCommented:
Last login was August.  This has apparently been abandoned, thus finalized.
Moondancer
Community Support MOderator @ Experts Exchange
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now