faqts : Computers : Internet : Web Servers : Apache : Installation and Setup

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

8 of 14 people (57%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

Why do I only see the source of my cgi file

Nov 16th, 2001 14:32
Anthony Boyd, Dennis Foreman,


The fast & lucky answer: your CGI is not marked as executable.  Try 
entering this at a shell prompt (change my.cgi to be your CGI's name):
chmod 755 my.cgi
If that doesn't work, make sure you're in the cgi-bin directory and try 
again.  If it still won't work, your server is probably not processing 
CGIs as programs.  You can add this line to your httpd.conf file to 
designate all files in a folder as executable:
ScriptAlias /cgi-bin /path/to/cgi/folder
After adding that, save the file and restart the server.  Does it work 
now?  It should.  If it STILL doesn't work, open the httpd.conf file 
and find the "Options" line, which probably has a few options listed 
already.  If "ExecCGI" is not listed, add it.  Save file, restart.