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 > Mac OS X > CGI Troubles

CGI Troubles
Thread Tools
Dedicated MacNNer
Join Date: Feb 2003
Location: Olympia, WA
Status: Offline
Reply With Quote
Apr 5, 2003, 12:45 AM
 
First off, I don't know quite what I'm doing, so it's probably a really dumb mistake. But...

I'm trying to install Grey Matter blogging software ( http://noahgrey.com/greysoft/ )on my friends OSX 10.1 server. All it requires is Perl 5 (have that) and the ability to run cgi scripts (not so sure...). I'm not sure what directory will function as a cgi-bin, since there wasn't one already there. I just made one in my Sites folder. So I upload all the files just like the directions say, and when I go to execute the installation script, I get a 'not found' message in the browser. The file is clearly there, I can see it in ftp and ssh. What's going on here?

Thanks for any help that you can provide.
     
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
Apr 5, 2003, 06:07 AM
 
Put CGI scripts in /Library/WebServer/CGI-Executables/

Make sure the file is marked as executable (type chmod a+x /Library/WebServer/CGI-Executables/scriptname in Terminal)
     
Dedicated MacNNer
Join Date: Feb 2003
Location: Olympia, WA
Status: Offline
Reply With Quote
Apr 5, 2003, 10:22 AM
 
Thank you for the reply. One question, though: if the scripts aren't within the sites folder, how do I run them from a browser?
     
Junior Member
Join Date: Mar 2001
Location: Over there
Status: Offline
Reply With Quote
Apr 7, 2003, 10:34 AM
 
Originally posted by anti-sleep:
Thank you for the reply. One question, though: if the scripts aren't within the sites folder, how do I run them from a browser?
Type http://yourdomainname/cgi-bin/scriptname.cgi into your browser where 'yourdomainname' is your web address and 'scriptname.cgi' is the name of the cgi script you want to run.

Apache by default has only one place from which cgi scripts can be run - from the 'CGI-Executables' folder within the 'global' web directory in /Library/WebServer. If you want individual users to be able to run cgi scripts, you need to specify this in /etc/httpd/httpd.conf (though I don't know how to do that, as I've never tried).
     
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Apr 13, 2003, 06:18 PM
 
What I was using perl's, i made it so I could execute CGI's from anywhere. Since there was really no way someone could upload anything anywhere, it wasn't much of a security risk. But perl's still can really be a hassle to get working correctly. The real solution is to switch to PHP's. Besides being way faster, PHPs are a snap to get running, just turn them on in your httpd.conf and thats it, insert php code into your files and change thier names to .php's, and they just run. Their great.
     
   
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 11:16 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