Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > CGI Script Help

CGI Script Help
Thread Tools
Professional Poster
Join Date: May 2001
Location: Santa Clara, CA
Status: Offline
Reply With Quote
Feb 4, 2002, 08:46 PM
 
I have this broblem uploading a forum script to a server, as I cannot get it working.

I'm trying to install a bulletin board called "YaBB," an open-source project. It tells me to upload some files in ASCII and others in BINARY, which is fine, but some need to go through a process called "chmod". Does anyone know how to do that? Or what that means for that matter?
World of Warcraft (Whisperwind - Alliance) <The Eternal Spiral>
Go Dogcows!
     
Forum Regular
Join Date: Nov 2000
Status: Offline
Reply With Quote
Feb 4, 2002, 10:29 PM
 
Originally posted by Jansar:
<STRONG>I have this broblem uploading a forum script to a server, as I cannot get it working.

I'm trying to install a bulletin board called "YaBB," an open-source project. It tells me to upload some files in ASCII and others in BINARY, which is fine, but some need to go through a process called "chmod". Does anyone know how to do that? Or what that means for that matter?</STRONG>

chmod is how you change the permission of the files. You can do a man chmod to get more info on it. But for cgi scripts i think you have to do this: "chmod 755 nameoffile"
Rhon
rfitz@princeton.edu
     
Jansar  (op)
Professional Poster
Join Date: May 2001
Location: Santa Clara, CA
Status: Offline
Reply With Quote
Feb 5, 2002, 01:33 AM
 
I see. So do you do it through the Terminal?
World of Warcraft (Whisperwind - Alliance) <The Eternal Spiral>
Go Dogcows!
     
Forum Regular
Join Date: Jan 2002
Status: Offline
Reply With Quote
Feb 5, 2002, 03:54 AM
 
Originally posted by Jansar:
<STRONG>I see. So do you do it through the Terminal?</STRONG>
Yeahup. Pretty simple, you either have to own the file or be root to modify its permissions.
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Feb 5, 2002, 03:59 AM
 
Originally posted by pizzasub:
<STRONG>

Yeahup. Pretty simple, you either have to own the file or be root to modify its permissions.</STRONG>
So if you do want to own it, try a <font face = "courier">sudo chown username filename</font> and enter your admin password.

BTW, I went nuts last night trying to figure out why running a CGI script kept giving me 'Error 500 - Internal Server Error' messages. It transpired that all the linebreaks in the CGI file were DOS - a simple resave from BBEdit as UNIX linebreaks and things were silky smooth. Well... better anyway

[ 02-05-2002: Message edited by: Simon Mundy ]
Computer thez nohhh...
     
Jansar  (op)
Professional Poster
Join Date: May 2001
Location: Santa Clara, CA
Status: Offline
Reply With Quote
Feb 5, 2002, 09:54 PM
 
Thanks for your help guys. I was able to "chmod" the files. However, my cgi script still won't run for some reason, but I've got our network admin on it, so it so it should be up soon. If you want to have an idea of what I'm talking about, click here.
World of Warcraft (Whisperwind - Alliance) <The Eternal Spiral>
Go Dogcows!
     
Forum Regular
Join Date: Jan 2002
Status: Offline
Reply With Quote
Feb 5, 2002, 10:48 PM
 
Originally posted by Jansar:
<STRONG>Thanks for your help guys. I was able to "chmod" the files. However, my cgi script still won't run for some reason, but I've got our network admin on it, so it so it should be up soon. If you want to have an idea of what I'm talking about, click here.</STRONG>
Hi,

It looks like your webserver needs to be configured to properly handle CGI scripts. When I go to that url, I get a perl script...
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Feb 6, 2002, 03:53 AM
 
Originally posted by pizzasub:
<STRONG>

Hi,

It looks like your webserver needs to be configured to properly handle CGI scripts. When I go to that url, I get a perl script...</STRONG>
There's two things you'll need to do in httpd.conf :-

Make sure the following line is uncommented:

<font face = "courier"> AddHandler cgi-script .cgi</font>

Then make sure the directory you're serving your CGIs from has the following directives (or something similar):

<font face = "courier"> &lt;Directory /path/to/your/CGI&gt;
Options MultiViews Indexes +Includes ExecCGI
AllowOverride None
&lt;/Directory&gt;</font>

The important command, obviously, being ExecCGI! I'm going to have a good bet that that's why your CGI file is being served up like that.
Computer thez nohhh...
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:03 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2