Solved

What is CGI scripting?

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
copy-item script help 15 85
Identify two keyboard codes and how to enter them 9 69
Unexpected End of File 11 58
Remote Exchange powershell returns different results 13 50
Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

749 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