For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > October 2005 > Getting started on standalone Windows machine









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Getting started on standalone Windows machine
Mary Anderson

2005-10-14, 6:55 pm


Hi all,

I have perl cgi installed successfully on my windows machine. I would
like to write a perl cgi program and display it in the browser on my own
Windows XP machine. To this end, I followed instructions in L. Stein's
book and created a registry ScriptMap called .pl of type REG_SZ with value
'C:\perl\bin\perl.exe %s %s'. The value is the correct one for my system.

However, when I open a .pl cgi file (known to work, because I can open it
OK with the DZSoft editor) in the browser, the perl interpreter is not
called and all I get is the text file displayed in the browser window.

Is it possible to view the file in a browser on my system? Or must I
have a web page on the server across campus and ftp the files there every
time I want to do something?

Thanks

Mary
Zentara

2005-10-15, 6:55 pm

On Fri, 14 Oct 2005 14:58:43 -0700 (PDT), mfanderson@ucdavis.edu (Mary
Anderson) wrote:

>
>Hi all,
>
> I have perl cgi installed successfully on my windows machine. I would
>like to write a perl cgi program and display it in the browser on my own
>Windows XP machine. To this end, I followed instructions in L. Stein's
>book and created a registry ScriptMap called .pl of type REG_SZ with value
>'C:\perl\bin\perl.exe %s %s'. The value is the correct one for my system.
>
>However, when I open a .pl cgi file (known to work, because I can open it
>OK with the DZSoft editor) in the browser, the perl interpreter is not
>called and all I get is the text file displayed in the browser window.
>
> Is it possible to view the file in a browser on my system? Or must I
>have a web page on the server across campus and ftp the files there every
>time I want to do something?


You need a http server, like Apache, in order for your cgi script to
work.

You can google for "apache for windows" and get it, then read
the setup instructions.

Then you can test your script locally, with
http://127.0.0.1/cgi-bin/yourscript.cgi
or
http://localhost/cgi-bin/yourscript.cgi

I use linux, so maybe someone will have better information about
running cgi on windows, but basically you want to run a server on your
"localhost".

Every computer has a "local ip number" 127.0.0.1 and it is usually
setup to be named "localhost".












--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html
andrmcg

2005-10-16, 6:55 pm

As Zentara points out, you have to run the file on a web server

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com