Solved

CGI run locally?

Posted on 1998-07-07
13
188 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
 
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 84

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 50 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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
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 …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

708 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

13 Experts available now in Live!

Get 1:1 Help Now