CGI in C

 
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI
View previous topic :: View next topic  
Author Message
newabyssuser
Guest





PostPosted: Thu Jan 30, 2003 5:32 pm    Post subject: CGI in C Reply with quote

I am getting 500 server errors when I try to execute a C program.

Installed Abyss, placed CGITEST.EXE program (simple CGI program in C) in cgi-bin directory. Configured ABYSS to CGI Processing YES, added CGI Interpreter as: cgi-bin/cgitest.exe extension: .exe

Created index.html to post a form METHOD=GET to
127.0.0.1/cgi-bin/cgitest.exe.

When I execute the index.html page I get server 500 errors with nothing in the cgi.log file.

I think I don't understand the assigning an extension to an interpreter correctly. Any help on what I'm doing wrong?

Much Appreciated.

Thanks!
Back to top
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Fri Jan 31, 2003 10:03 am    Post subject: Re: CGI in C Reply with quote

newabyssuser wrote:
I am getting 500 server errors when I try to execute a C program.

Installed Abyss, placed CGITEST.EXE program (simple CGI program in C) in cgi-bin directory. Configured ABYSS to CGI Processing YES, added CGI Interpreter as: cgi-bin/cgitest.exe extension: .exe

Created index.html to post a form METHOD=GET to
127.0.0.1/cgi-bin/cgitest.exe.

When I execute the index.html page I get server 500 errors with nothing in the cgi.log file.

I think I don't understand the assigning an extension to an interpreter correctly. Any help on what I'm doing wrong?

Much Appreciated.

Thanks!

This is not related to assigning extensions to interpreters. Your CGI executable can run without that.
Error 500 happens because your program doesn't conform to the CGI standard (this is the cause in 90% of the cases.)
To help you, please post here the source of your C program and we will tell you what's wrong.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
newabyssuser
Guest





PostPosted: Fri Jan 31, 2003 3:27 pm    Post subject: Thanks - problem solved. Reply with quote

Found the problem - I was incorrectly sending the CR/LF pair at the end of my 'Content-Type:text/html...'. Was sending them as HEX 13/10 instead of decimal.

I incorrectly thought that any malformed response would be sent to the browser and then viewable via 'view source'.

Thanks again for show me the path...
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group