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
Solved

What is CGI scripting?

Posted on 1997-07-16
3
384 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
  • 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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

861 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