Learning CGI

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


Joined: 07 Dec 2005
Posts: 1

PostPosted: Wed Dec 07, 2005 3:17 am    Post subject: Learning CGI Reply with quote

I have successfully written a few cgi scripts using delphi 7. They are very basic because I am learning.

I have written one simple form which invokes a script as follows -
-
ShellExecute(Handle, 'explore', PChar('c:\windows'), nil, nil, SW_SHOW)
-

What this does in delphi is run windows explorer and shows the c:\windows folder. The script gets that far but then the server gives a 500 error (internal server error) and the log file states 'broken pipe'.

Does CGI require that the parameters from the form actually undergo some processing? I am tired from beating my head against the problem, so I thought i would rahter ask somebody than continue my self-mortification.

regards
_________________
--- Just because it never happened doesn't mean it isn't true. ---
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed Dec 07, 2005 1:26 pm    Post subject: Re: Learning CGI Reply with quote

capsicum,

The CGI application you wrote seems to not send the CGI headers which are required. Any CGI application should at least send these headers:

Code:
Status: 200 OK



The second empty line contains only a carriage return (character 13 in ASCII).

Can you post here the full source code?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Quivis
-


Joined: 28 Jan 2006
Posts: 3

PostPosted: Sat Jan 28, 2006 8:45 pm    Post subject: Reply with quote

It seems "capsicum" solved his or her problem. But if there is an interest, I've been fiddling with a Delphi CGI counter that works, based on the following counter: http://homepages.borland.com/aohlsson (if it's still there, haven't checked)

"capsicum" can reply to this message if there still are problems. I might be able to help. Code is too verbose to post here, so it has to be made via e-mail, if at all.
Back to top View user's profile Send private message
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