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 > macOS > I tryed everything how do I get cgi scripts running in apache?

I tryed everything how do I get cgi scripts running in apache?
Thread Tools
IUJHJSDHE
Mac Elite
Join Date: Aug 2001
Location: Australia
Status: Offline
Reply With Quote
May 12, 2002, 03:33 AM
 
I real the manual file and try lots of different things but no matter what I do it will not run cgi files

Here is the config

ScriptAlias /cgi-bin/ "/Library/WebServer/CGI-Executables/"

<Directory "/Library/WebServer/CGI-Executables">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
Anyone know what I should also do to make it work?
     
thanatos
Dedicated MacNNer
Join Date: Sep 2000
Status: Offline
Reply With Quote
May 12, 2002, 06:50 AM
 
You should not change anything in the config file it should work anyway. Have you set the right permissions with "chmod 755 file.cgi"? The url should be http://localhost/cgi-bin/file.cgi

This question belongs in the MacOSX UNIX forum...

[ 05-12-2002: Message edited by: thanatos ]
     
IUJHJSDHE  (op)
Mac Elite
Join Date: Aug 2001
Location: Australia
Status: Offline
Reply With Quote
May 12, 2002, 08:35 AM
 
Thank you, that fixed it, I wonder why they were with wrong permissions
     
philzilla
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
May 12, 2002, 10:20 AM
 
another thing to be aware of, should some scripts fail, is the line endings. when i first got my hands on OS X and set it up to serve scripts, they failed because of that. my scripts had macintosh line endings, not unix ones. i fixed that and everything worked. if you don't have BBE, then you can just type this in terminal:
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>perl -pi -e 's/\r\n?/\n/g' </font>[/code]
then drop your script onto the terminal window and it should change the line breaks for you
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
dscottbuch
Junior Member
Join Date: Sep 2000
Location: rancho Santa Fe, CA, USA
Status: Offline
Reply With Quote
May 12, 2002, 10:31 AM
 
I don't know about others, or if you did this, but to get perl working on my system I had to modify the following line to look like this.

AddHandler cgi-script .cgi .pl


Originally posted by IUJHJSDHE:
<STRONG>I real the manual file and try lots of different things but no matter what I do it will not run cgi files

Here is the config



Anyone know what I should also do to make it work?</STRONG>
     
   
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
Top
Privacy Policy
All times are GMT -4. The time now is 04:45 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,