CGI program will not execute :(

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





PostPosted: Thu Nov 07, 2002 5:50 pm    Post subject: CGI program will not execute :( Reply with quote

I have created a simple CGI program using ADA 95.

WITH Cgi; USE Cgi;

PROCEDURE Control IS

BEGIN
Put_Html_Head("cgi");
Put_Html_Tail;

END Control;

It returns the following

<HTML><HEAD><TITLE>cgi</TITLE></HEAD><BODY></BODY></HTML>

I complie the program using GNAT (I think it creates a 16bit executable)

However on creating a link to the cgi program the server reports an internal error :(

Any suggestions as to what is going on.


btw i reg but this forum will not let me log in ?!?
Back to top
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Thu Nov 07, 2002 6:55 pm    Post subject: Re: CGI program will not execute :( Reply with quote

The_Duck(1) wrote:
I have created a simple CGI program using ADA 95.

WITH Cgi; USE Cgi;

PROCEDURE Control IS

BEGIN
Put_Html_Head("cgi");
Put_Html_Tail;

END Control;

It returns the following

<HTML><HEAD><TITLE>cgi</TITLE></HEAD><BODY></BODY></HTML>

I complie the program using GNAT (I think it creates a 16bit executable)

However on creating a link to the cgi program the server reports an internal error :(

Any suggestions as to what is going on.

Abyss Web Server X1 runs 16 bit executable so that won't be the problem.
Your program send only the HTML output. It should also send at the beginning at least a status header to be conforming to CGI.
All you have to do is to add a single line at the beginning:

Code:

WITH Cgi; USE Cgi;

PROCEDURE Control IS

BEGIN
   Put_CGI_Header;
   Put_Html_Head("cgi");
   Put_Html_Tail;
END Control;


The Ada CGI library documentation is available at http://www.cs.uofs.edu/~beidler/Ada/cgi/cgi.html .

The_Duck(1) wrote:
btw i reg but this forum will not let me log in ?!?

Have you enabled cookies ?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
The_Duck
-


Joined: 07 Nov 2002
Posts: 7

PostPosted: Thu Nov 07, 2002 11:01 pm    Post subject: Reply with quote

omg :0)

I not done cgi in ada for a while and I can't belive i missed CGI_Header; Sry if you had to do any resarch to look that up and ty for doing it :) Saved me a few hrs work :D

Forum now longs me in strange. Perhaps there was a delay in database update ??

Anyway ty again :D
Back to top View user's profile Send private message Send e-mail MSN Messenger
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Thu Nov 07, 2002 11:53 pm    Post subject: Reply with quote

The_Duck wrote:
omg :0)

I not done cgi in ada for a while and I can't belive i missed CGI_Header; Sry if you had to do any resarch to look that up and ty for doing it :) Saved me a few hrs work :D

Forum now longs me in strange. Perhaps there was a delay in database update ??

Anyway ty again :D

Do not apologize, that was a great occasion for us to have some ADA knowledge. :D
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
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