Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

apache cgi not working

Status
Not open for further replies.

pwrlogic

Programmer
May 15, 2003
9
0
0
US
i am going nuts
i set up the addhandler and the scriptalias and i still can not get my cgi to work right
whenever i invoke a cgi script i get a internal server error 500
the script gets invoked and runs but the access log shows a 500 604 code and the error logs says something about malformed headers.
i also put execcgi in the directory options.
i have to get a 200 ok code and i cant
any ideas
please hel[
 
Check your httpd.conf for the .cgi and .pl entries. You may need to create a directive to run these from the cgi-bin directory with a different alias, such as to run .pl scripts. You should be able to search you conf for .cgi and see how its written.
 
If you FTP your program make sure to upload in ascii mode.

If you wrote or saved you cgi-script in a windows/dos program like wordpad the DOS carriage returns are invisible(^M). So when you upload and run it, unix finds ^M's in the cgi program and spits out a 500 Server Error

Try this at command prompt while in you script directory:

pico (your_filename)
ctrl + O
ctrl + X

This might help get rid of your malformed headers error.




Blizz
 
Can you paste in the exact error log?

Cna you also paste how you are sending your headers from the cgi script?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top