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

x
?
Solved

CGI run locally?

Posted on 1998-07-07
13
Medium Priority
?
195 Views
Last Modified: 2013-12-25
Can CGI be run from a local machine?  Or does it have to be across the network?  If the answer is YES to the former, then please don't answer if you can't tell me HOW it's done (in which case I'll ++ the points).

Thanks,

Raydot.
0
Comment
Question by:Raydot
  • 4
  • 4
  • 3
  • +2
13 Comments
 
LVL 3

Author Comment

by:Raydot
ID: 1830540
Not across the network, across the Internet, is what I meant...

'Dot.
0
 
LVL 6

Expert Comment

by:alamo
ID: 1830541
It does not need to be run over the Internet, but it does need to be run from a web server. You need to get a web server and install it on your own machine (there are free ones available). You would then access it with http://localhost/.
0
 
LVL 3

Expert Comment

by:moonlight
ID: 1830542
The Common Gateway Interface (CGI) is a standard for interfacing external applications with information servers, such as HTTP or Web servers. This means you got to go through your Http server for it to be run, (otherwise you could just type the command name at your shell) and that your CGI script is run on the server machine. No distinction is made between local and 'across the net' machine as long as they go through the server, which means if you consider the machine the server runs on, as local, then the answer is yes, and you access it exactly as anybody else. If you want the program however to run on the machine, where you have your webbrowser, then the answer is no. you can not. Then you must use java, preferably as an applet, or to use netscape's javascript language (if you want to discriminate internetexplorer users :) ), because you need a platform independent language.
0
[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

 
LVL 6

Expert Comment

by:alamo
ID: 1830543
Of course you can run a CGI program on the machine where your web browser is, as long you have a web server on the same machine. In fact that's by far the easiest way to test during CGI development.
0
 
LVL 3

Expert Comment

by:moonlight
ID: 1830544
The part about not running it with your shell, is because you
get environments from the server that you can use. (and which you don't get if you run it from shell).the CGI script/program is as runnable as all other executables however. There is an exception going with that, if you have a NT web server, but working on a PC Lan, and don't have access to the NT machine, then you can copy others' CGI programs and have them in your CGI directory and make them work but can't actually run them on your pc and you can't make your own.

alamo: doesnt work with my machine, but I think you can always use file:///
0
 
LVL 6

Expert Comment

by:alamo
ID: 1830545
moonlight, file:// won't work because it doesn't connect to the web server, it simply loads the file directly. If you install a web server on your machine then you can use that server to run CGIs on your machine - it doesn't work for you because you don't have a web server.

To rephrase what I said before, you don't need your machine to be connected to anything - the Internet or even a Lan - in order to run CGIs if you set your machine up properly.
0
 
LVL 85

Expert Comment

by:ozo
ID: 1830546
http://localhost/
You could also set environment variables and run from your shell
0
 
LVL 3

Author Comment

by:Raydot
ID: 1830547
That's great, I'm even MORE confused.  I'm gonna think this over for a bit, and get back to y'all...hope you've checked your e-mail notification boxes...
0
 
LVL 28

Expert Comment

by:sybe
ID: 1830548
Don't think too long, if you want to run CGI on your machine, then get a webserver program. There are a couple of them you can get for free (if you use windows95, you can install Microsoft Personal Web Server, but also O'Reilly's and some others are available).

For CGI you can use scripts (e.g. Perl) or executables (made in C++ or VB or whatever).

Perl for windows is also free.







0
 
LVL 3

Expert Comment

by:moonlight
ID: 1830549
yep, http://localhost/ should work alright.
I don't have the server on my local machine, but
it should work for those who does nevertheless
0
 
LVL 3

Author Comment

by:Raydot
ID: 1830550
Here's the deal.  While Moonlight did come around to it eventually, it was Alamo's answer that got me to log onto Tucows and dig around for server software.  I found a piece of 1.5M software that allows me to run CGI scripts as if they were up on a server.  So I'd like to give the points to Alamo...

Sorry, M'light.  Alamo, please re-answer and the points are yours.
0
 
LVL 6

Accepted Solution

by:
alamo earned 200 total points
ID: 1830551
Thanks, Raydot, glad I could help!
0
 
LVL 3

Expert Comment

by:moonlight
ID: 1830552
sure, do what you want, but you hadnt asked for software
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

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

916 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