Forums | MacLife

You are not logged in.

#1 2008-03-02 9:26 pm

g5 Urban Derelict
Member
From: right coast
Registered: 2003-11-11
Posts: 622

This a good place for CGI discussion?

I'm trying to get back into learning CGI, I have the book CGI 101 which has live links but I'm not sure where the CGI directory belongs, I thought It belong <i>next</i> to the <b>Documents</b> folder in WebServer</b> in your System/Library/ folder.

Because I remember in the set up you want the cgis in a single folder that allows writing, but not across the rest of the site.

Anyone care to offer any help? I also remembered that you have to restart the web server after you make changes to the httpd.conf, which I think I may want to get a fresh copy to alter to start over following the rules again, can I get that file off my installation disk? I had a special version of 10.2.8 which was new for the ppc g5 I bought.


1.6GHz g5 - 1.5G ram/SuperDrive

Offline

 

#2 2008-03-03 6:37 pm

Gipetto
Yankee Doodle's noodle
Royal Wombat
From: People! Ahg!!
Registered: 2000-09-24
Posts: 9938
Website

Re: This a good place for CGI discussion?

The cgi-bin can be anywhere you want it to be. The location is controlled via the server definition in Apache.
http://httpd.apache.org/docs/1.3/howto/cgi.html


So, just when did this place get Private Messages? YIKES!

Gippy Pages  |  Fuzzy Coconut XHTML Widget | PuppyCam

Offline

 

#3 2008-03-03 6:41 pm

g5 Urban Derelict
Member
From: right coast
Registered: 2003-11-11
Posts: 622

Re: This a good place for CGI discussion?

Right, i forgot about that, thanks, you name it's location in the hpptd.conf file right? and you remove the #s because they're commented out with it.

So in your expert opinion where would be the best place? Within the site or next to it? That'll be the only directory with read/write/x permissions...

And I already have the router pointed to my page, actually I'm updating my comcast personal website to mirror it, and if i can't get the cgi working on the comcast server i can use my machine, the reason i want to user their servers is obvious, i'm connected to my lan via airport.


1.6GHz g5 - 1.5G ram/SuperDrive

Offline

 

#4 2008-03-03 7:11 pm

Miles
Now I fight for wisdom!
Administrator
From: Michigan
Registered: 2001-07-21
Posts: 4497
Website

Re: This a good place for CGI discussion?

Generally speaking, the www user should not be able to write to the CGI directory.

Online

 

#5 2008-03-03 7:30 pm

g5 Urban Derelict
Member
From: right coast
Registered: 2003-11-11
Posts: 622

Re: This a good place for CGI discussion?

Well how else are the CGIs supposed to process the information the put into text boxes, say for joining an email list?

I'll follow what the book says, come to think of it.  They also have I think the first 5 chapters online, probably at http://www.cgi101.com.

I'll let you know how it goes, I also have to put together these multi-page pdfs so i can scan all my old magazine subscriptions and toss the hard copies.


1.6GHz g5 - 1.5G ram/SuperDrive

Offline

 

#6 2008-03-03 9:24 pm

Gipetto
Yankee Doodle's noodle
Royal Wombat
From: People! Ahg!!
Registered: 2000-09-24
Posts: 9938
Website

Re: This a good place for CGI discussion?

Have a dedicated upload directory if you need to accept or have manipulatable files. Also, if you need to have writable files don't keep them in the CGI directory, keep them below the web root and not directly servable. They should only be accessible through the file system and not via the server itself.

Optimally you should be logging and holding data in a database, but if you need to work with flat files then keep them out of the web root, in a safe place, and make sure when you save a file that has been uploaded that you take precautions to keep it from being executable, and if you take data that you scrub it so that it can't be malicious.


So, just when did this place get Private Messages? YIKES!

Gippy Pages  |  Fuzzy Coconut XHTML Widget | PuppyCam

Offline

 

#7 2008-03-03 9:27 pm

g5 Urban Derelict
Member
From: right coast
Registered: 2003-11-11
Posts: 622

Re: This a good place for CGI discussion?

Neat, thanks for the advice!


1.6GHz g5 - 1.5G ram/SuperDrive

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson