Solved

What is CGI scripting?

Posted on 1997-07-16
3
388 Views
Last Modified: 2013-12-25
I have no idea what cgi scripting is and I want to learn.  I have no experience in programming except a little basic.  Can someone help me out?  I want to write a guestbook that askes for name, url, e-mail address, and a comment and then re-writes the pages html to post the message at the bottm of the page.  I have one that works like this at http://members.tripod.com/~Hypes_World/ryan.html   someone else set it up for me though and I don't know who his is so I want it to work like that one.  I tried to copy it out of that page, but it doesn't work.  I am writing a new page at my college.  Thanks for any help
0
Comment
Question by:rbirk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
icd earned 100 total points
ID: 1829108
Since you already have a script on your page then it would seem there is no problem with your service provider allowing you to run your own scripts. (Or did the service provider set it up for you?). However since it is in the /bin/ directory and your directory seems to be a members directory then it is possible that you don't have access to it. You must check with your service provider if you are not sure. The main check is, are you able to ftp files into the bin directory in the same way as you can ftp to your ~Hypes_World directory?

CGI scripts are usually (but not exclusively) written in perl. This is an interpreted language and is a little like C. There are many, many scripts available on the Web to download including ones to write guestbooks. It would be worth your while at least looking at them to find out how they work before re-inventing the wheel.

You will not be able to copy scripts off the internet directly. They are usually in directories that allow the file to be executed but not read. In your case it is in the bin directory, usually they are in a directory called cgi-bin. Sometimes they can be put in the same directory as html files by being given the extension .cgi but this is a security problem and is not often done.

The best way to learn about cgi programming is to obtain the 'Llama' book which teaches you perl and cgi programming.

'Learning Perl by Randal L. Schwartz ISBN 1-56592-042-2'

0
 

Author Comment

by:rbirk
ID: 1829109
I am switching service providers from tripod to iowa state university and I asked them about guestbooks and they said they don't have one available for me.  So what do I need to do?  Download a script and put it in iowa states cgi-bin dir and add some stuff to my html page?  Why isn't it possible to just use Java or Html to write a page to accomplish this task?  This cgi crap is too damn commplicated and is far beyond my reach.  I have never programmed in C and think it is such an archaic language that it shouldn't even be on the market, even though I realize it is one of the most powerful languages available.  Why can't we have languages as simple a basic yet as powerful as C?  I wish I knew how to do this CGI stuff, but I don't understand why it is all nececary.  LAter all.
0
 
LVL 5

Expert Comment

by:icd
ID: 1829110
As I said above. If iowa state university allow you to run your own scripts then you would indeed need to download it.

There are many scripts available to do guestbooks etc. There are a few (good quality) scripts at the following:-

http://www.technotrade.com/cgi/index.html

Mostly scripts are written in Perl and in my opinion it is a simple yet powerful language, in the area of text manipulation it is even more powerful than C. I would however dispute your opinion that is is 'archaic' especially when you refer to the language 'basic' in the same sentence! :-)

You cannot use HTML since it has no means of writing to either the server or the client computers. Java is indeed an option but since it is effectively a 'trimmed down C++' then I expect you would not think very highly of it. :-)

0

Featured Post

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

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

This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

734 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