Gossamer Forum
Home : Products : DBMan : Installation :

No http headers

Quote Reply
No http headers
When I click Add Record I get this message:
CGI Error

The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

?

M.
Quote Reply
Re: No http headers In reply to
Make sure that you have the fulling code in both your sub html_add_success and sub html_add_failure routines at the beginning of the sub-routine before the first print qq|:

Code:
&html_print_headers;

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: No http headers In reply to
This is what it looks like and I still get "no headers" error:

sub html_add_success {
# --------------------------------------------------------
# The page that is returned upon a successful addition to
# the database. You should use &get_record and &html_record
# to verify that the record was inserted properly and to make
# updating easier.

$page_title = "Record Added";
&html_page_top;
&html_print_headers;

# < -- Start page text -- >

print qq|
<P><$font>The following record was successfully added to the database:</FONT>
|;
# < -- End page text -->

&html_record(&get_record($in{$db_key}));

&html_footer;
&html_page_bottom;
}

sub html_add_failure {
# --------------------------------------------------------
# The page that is returned if the addition failed. An error message
# is passed in explaining what happened in $message and the form is
# reprinted out saving the input (by passing in %in to html_record_form).

my ($message) = $_[0];

$page_title = "Unable to Add Record";
&html_error_page_top;
&html_print_headers;

$submit_button = "Add Record";
$reset_button = "Reset Form";

# < -- Start page text -- >

print qq|
<$font>There were problems with the following fields:
<FONT COLOR="red"><B>$message</B></FONT>
<P>Please fix any errors and submit the record again.</p></font>
|;
# < -- End page text -->

print qq|
<form action="$db_script_url" method="POST" name="form1">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
|;

&html_record_form (%in);

print qq|
<p><center>
<INPUT TYPE="SUBMIT" NAME="add_record" VALUE="$submit_button">
<INPUT TYPE="RESET" VALUE="$reset_button">
</center></p></form>
|;

&html_footer;
&html_page_bottom;
}
Quote Reply
Re: No http headers In reply to
Try putting the following code in the html_add_success routine:

Code:
&html_page_top;

BELOW the following code:

Code:
&html_print_headers;

Edit the following codes in the sub html_add_failure routine:

Code:
$page_title = "Unable to Add Record";
&html_error_page_top;
&html_print_headers;

$submit_button = "Add Record";
$reset_button = "Reset Form";

to read as follows:

Code:
$page_title = "Unable to Add Record";
$submit_button = "Add Record";
$reset_button = "Reset Form";
&html_print_headers;
&html_error_page_top;


Does this make sense?

Hope this helps.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited September 16, 1999).]
Quote Reply
Re: No http headers In reply to
It makes sense, but it still doesn't work!

This is the Adding Section:

##########################################################
## Adding ##
##########################################################

sub html_add_form {
# --------------------------------------------------------
# The add form page where the user fills out all the details
# on the new record he would like to add. You should use
# &html_record_form to print out the form as it makes
# updating much easier. Feel free to edit &get_defaults
# to change the default values.

$page_title = "Add a New Record";
&html_page_top;

$submit_button = "Add Record";
$reset_button = "Reset Form";

# < -- Start page text -- >
print qq|

|;
# < -- End page text -->

print qq|
<form action="$db_script_url" method="POST" name="form1">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
|;

&html_record_form (&get_defaults);

print qq|
<p><center>
<INPUT TYPE="SUBMIT" NAME="add_record" VALUE="$submit_button">
<INPUT TYPE="RESET" VALUE="$reset_button">
</center></p></form>
|;

&html_footer;
&html_page_bottom;
}

sub html_add_success {
# --------------------------------------------------------
# The page that is returned upon a successful addition to
# the database. You should use &get_record and &html_record
# to verify that the record was inserted properly and to make
# updating easier.

$page_title = "Record Added";
&html_print_headers;
&html_page_top;

# < -- Start page text -- >
print qq|
<P><$font>The following record was successfully added to the database:</FONT>
|;
# < -- End page text -->

&html_record(&get_record($in{$db_key}));

&html_footer;
&html_page_bottom;
}

sub html_add_failure {
# --------------------------------------------------------
# The page that is returned if the addition failed. An error message
# is passed in explaining what happened in $message and the form is
# reprinted out saving the input (by passing in %in to html_record_form).

my ($message) = $_[0];

$page_title = "Unable to Add Record";

$submit_button = "Add Record";
$reset_button = "Reset Form";
&html_print_headers;
&html_error_page_top;

# < -- Start page text -- >
print qq|
<$font>There were problems with the following fields:
<FONT COLOR="red"><B>$message</B></FONT>
<P>Please fix any errors and submit the record again.</p></font>
|;
# < -- End page text -->

print qq|
<form action="$db_script_url" method="POST" name="form1">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
|;

&html_record_form (%in);

print qq|
<p><center>
<INPUT TYPE="SUBMIT" NAME="add_record" VALUE="$submit_button">
<INPUT TYPE="RESET" VALUE="$reset_button">
</center></p></form>
|;

&html_footer;
&html_page_bottom;
}

I'm sorry to be so dense about this, but I just don't see what's wrong.

Thanks,

M.
Quote Reply
Re: No http headers In reply to
PLEASE copy the exact codes I gave you! You still have syntax errrors! Try copying word for word what I gave you.

I REALLY hope this helps.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us