Hi Matt,
>Unfortunately I can't help you with your PQExec call, but maybe I can
>offer you a suggestion. Instead of causing the cgi program to 'crash'
>with exit(), why not print an error message or the return code out in
>HTML and then end the html in the usual way (ie </BODY></HTML>) >before
>calling exit? That way Apache will be able to display >something and you
>might be able to debug more easily as well.
Thanks for the suggestion. Unfortunately, I probably didn't explain this
well enough in the rush to send it.
Apache buffers all the output of the cgi until the cgi is done. After the
cgi is done, then the user sees whatever was generated. If the cgi crashes
during execution, no output (including error messages I might have put in)
will be shown.
One of the first things done in the cgi is to write the appropriate <html>
tags, so I can see any errors that might occur. The, around suspect bits of
code, I'll put a statement like:
printf("the SQL query is: %s", query);
exit(0);
This will print out the query, then exit right after. The exit() tells
apache "The cgi worked fine, you can send it as html output now."
Notice that I don't put terminating </body></html> tags after the message,
as they are not necessary for the browser to display the output.
Regards,
Alex
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text