Re: [Way OT] perl, CGI, and sendmail
On Sun, Apr 10, 2005 at 03:39:08PM -0500, David wrote:
> I know this ain't Debian but I've racked my brain on this.
>
> Been experimenting with CGI, using perl. I have a form that generates
> the needed variables, etc.
>
> I have it to where when I submit the data, the mail is sent and I
> receive it (FWIW, using exim4), Exim doesn't report any errors, but I
> get a 500 error (Internal Server Error) from apache (1.3.33-4).
You're not generating any output to return to the browser (you know,
that typical pretty useless page "Your mail has been sent. Thank you
for ..." ;) When a CGI script doesn't produce any output, it's
considered an "internal error" by the server. If you really do not
want to send anything back, you could make use of the HTTP status code
204 (No Content). In this case, both the server and the browser will
be happy about not having anything to exchange...
If you want to try the latter, but can't figure out how to return 204
instead of the normal 200, just report back (maybe off-list, as this
really isn't debian any longer :)
Almut
BTW, it suffices to simply 'use CGI qw(...);' -- no need for an extra
'require "CGI.pm":'
Reply to: