Nkuvu has asked for the wisdom of the Perl Monks concerning the following question:
I've been playing with a script that jeffa wrote, CGI mailto via code reuse (AKA the CPAN). And I can't seem to get it to work. The script is identical to what jeffa wrote, with the exception of changing the email addresses. But running this through Apache 1.3.28 I keep getting "premature end of headers" in my error.log.
I've tried adding a $|++; with no change in results. When I run this from the command line I'm getting HTML output. Suggestions more than welcome.
Content-Type: text/html; charset=ISO-8859-1 <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-U +S"><head><title>The Form</title> </head><body> <form method="post" action="/mail_it.cgi" enctype="application/x-www-f +orm-urlencoded"> name: <input type="text" name="name" /><br /> email: <input type="text" name="email" /><br /> address1: <input type="text" name="address1" /><br /> address2: <input type="text" name="address2" /><br /> city: <input type="text" name="city" /><br /> state: <input type="text" name="state" /><br /> zip: <input type="text" name="zip" /><br /> homephone: <input type="text" name="homephone" /><br /> workphone: <input type="text" name="workphone" /><br /> business: <input type="text" name="business" /><br /> goals: <input type="text" name="goals" /><br /> comments: <input type="text" name="comments" /><br /> <input type="submit" name="mail_it" value="mail_it" /><div></div></for +m></body></html>
While I think this is probably an Apache problem, I'm not clear enough on my CGI to be able to point definitively to it. Note that I have successfully created other CGI scripts without this problem. So it seems that CGI is horking on complicated scripts but working fine for straightforward scripts.
What am I overlooking? Which M should I be RTFing?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI Header problem/question
by OverlordQ (Hermit) on Dec 20, 2003 at 17:41 UTC | |
by Nkuvu (Priest) on Dec 20, 2003 at 17:45 UTC | |
|
Re: CGI Header problem/question
by b10m (Vicar) on Dec 20, 2003 at 17:47 UTC | |
by Nkuvu (Priest) on Dec 20, 2003 at 17:53 UTC | |
by Anonymous Monk on Dec 22, 2003 at 12:11 UTC | |
|
Re: CGI Header problem/question
by oha (Friar) on Dec 20, 2003 at 18:51 UTC |