Server Administration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Try It Free
Go Back   Codewalkers ForumsOther TechnologiesServer Administration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old March 10th, 2004, 03:40 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
CGI Please Help

aight i hope i am posting in the correct place... sry if i'm not but i have a website that i am trying to give a boost onto... How do i run cgi script. I got a login page that is cgi and i don't know how to run it.. My setup is a file with my web page stuff in it like 2 htm docs and a cgi-bin folder... Also if you know of a free managable login for my site that allows people to signup that would b great to.l.. thanx for the help... zacharytest.cjb.net

Reply With Quote
  #2  
Old March 12th, 2004, 06:55 PM
postalcow postalcow is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Ford CIty, PA USA
Posts: 1,267 postalcow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via Yahoo to postalcow
RE: CGI Please Help

put the cgi script into your cgi-bin change the permissions to 0755. You should be able to execute it now

Reply With Quote
  #3  
Old March 12th, 2004, 10:37 PM
DarkDrift DarkDrift is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 3 DarkDrift User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to DarkDrift
RE: CGI Please Help

I dont understand how to do that and how do i call it from a html file... Thanx for that tip but can u goto more depth please

Reply With Quote
  #4  
Old March 13th, 2004, 02:16 AM
postalcow postalcow is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Ford CIty, PA USA
Posts: 1,267 postalcow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via Yahoo to postalcow
RE: CGI Please Help

Explain what type of cgi it is? is it like a form processor?

Reply With Quote
  #5  
Old March 22nd, 2004, 03:25 AM
bluephoenix's Avatar
bluephoenix bluephoenix is offline
Levelheaded Curmudgeon
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Syracuse, NY
Posts: 507 bluephoenix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 13 m 2 sec
Reputation Power: 2
Send a message via AIM to bluephoenix
RE: CGI Please Help

CGI a set of rules that say how a web server and other programs on the same machine can talk with each other.

A CGI script runs on the server machine. It accepts it's input from the web server and then sends the output back to web server (and thus back to the user).

Oftentimes CGI confused with programming languages such as Perl or Python. It is not a language... CGI is the interface between a server and a program. A CGI script is just code which uses CGI.

There are many different ways one can set up and run CGI scripts, but no matter how one does it, there must be two conditions met: 1) the script must be considered executible, and 2) the web server must recognize the script as a CGI.

CGI scripts must be executable. In the *nix world, this is done by modifing the access permissions of the file with the chmod command. How you access your host will dictate how you execute a chmod; you may be able to execute it directly on a command line or you may need to execute it through your FTP software.

The permissions should be set so that the owner of the file can read, write and execute it. Those in the group or others should only be able to read and execute it. This translates to permissions of 0755, or rwxr-xr-x . A nice little utility to help determine permission numbers can be found at www.liepins.de/stuff/chmod.php.

How a server application will recognize a script is a CGI script as opposed to any other executible depends on how the server has been configured. Most commonly, the file extension must be .cgi.

Some adminstrators may also require that CGI scripts be in a certain directory (for security auditing purposes). Traditionally, this directory is named cgi-bin.

If the script looks like a CGI (ends in .cgi), smells like a CGI (is executable) and tastes like a CGI (located with in the cgi-bin directory), chances are the web server will think it's a CGI and try to communicate with it. If not, you'll need to configure your web server (or talk to your system administrator).

The next hurdle is to actually make the end user able to access the CGI script. Again, there are several ways to accomplish this. The most common are accessing it directly or including it with Server Side Includes (SSI+).

To access it directly, the user would follow the an address that points to the script, such as www.example.com/cgi-bin/login.cgi.

SSI+s are directives placed within an HTML document which link to the output of the CGI script, and typically take the form <!--#command attribute="value" -->. These pages may also require a special extension (tranditionally .shtml) depending on the server configuration.

The SSI+ comamnds you'll probably find the most relavant are include and exec:

<!--#exec cgi="/cgi-bin/login.cgi" -->
<!--#include virtual="/cgi-bin/login.cgi" -->

I would recommend reading Chapter 14 (Server-Side Includes) and Chapter 16 (CGI and Perl) of Apache: The Definitive Guide by Ben and Peter Laurie if you want to learn more about configuring a server (obviously Apache) and implementing SSI+ and CGI. But, you'd probably want to see if the book is available at your local library or if a friend will loan it to you; the rest of the book isn't worth the $39.95/61.95 US/CAN price.

Best of Luck.

-Tim

Reply With Quote
  #6  
Old March 22nd, 2004, 11:32 AM
postalcow postalcow is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Ford CIty, PA USA
Posts: 1,267 postalcow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via Yahoo to postalcow
RE: CGI Please Help

Thanks Tim, But I meant what king of script is he having problems with, not really what is a cgi

Thanks for the long explaination though.


Reply With Quote
  #7  
Old March 23rd, 2004, 03:57 AM
bluephoenix's Avatar
bluephoenix bluephoenix is offline
Levelheaded Curmudgeon
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Syracuse, NY
Posts: 507 bluephoenix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 13 m 2 sec
Reputation Power: 2
Send a message via AIM to bluephoenix
RE: RE: CGI Please Help

Yeah, I know you knew... but I was trying to provide a thorough explaination for DarkDrift.

I couldn't believe I wrote that much, though. lol

-Tim

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesServer Administration > CGI Please Help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway