Sendmail CGI generates Apache error
alex at mindlube.com
Sat Nov 29 17:21:59 EST 2003
On Nov 29, 2003, at 3:04 PM, katir at hindu.org wrote:
> Due to spiders harvesting email addresses from our web sites, which
> results in a flood of spam, we are planning to remove them all and use
> a form-post-to-cgi model. I would like to use transcript. If anyone
> has invented this wheel already, email me off list.
You are doing it the hard way. There any lots of methods for
obfuscating email addresses on web sites to hide from spam harvesters.
There is no reason to force people to use form-mailers. I dislike those
and I think a lot of other people do too. See
> The following actually works, the mail is sent, but it is followed up
> immediately with an error msg from the server... any ideas? for some
> strange reason the error is not logged into the webmaster/error log...
> i suspect that's because in fact it works, ie the email *is* sent....
> does apache expect us to handle stdout? But, there is none...?
You didn't show us the entire script?
What is the exact error message from the web server?
Most of the time 500 server error problems are because the script does
not return a valid http header, or returns other content before the
Immediately after startup, before doing any other work:
put "Content-type: text/html" & crlf & crlf
put "doing it...<br>"
Now you have sent a valid http header, and are in much better shape for
discovering what the error message is.
You *always* have to send a valid http header of some kind back to the
browser, when writing a CGI.
> ## disclaimer: this is just a start, we obviously need
> ## a lot of error checking for user input
> ## and feed back to the user by http... which will all
> ## be added later.
> on startup
> if $REQUEST_METHOD is "POST" then
> read from stdin until empty
> ## put the form data into an array,
> put urlDecode (it) into tDataIn
> split tDataIn by "
Alex Rice <alex at mindlube.com> | Mindlube Software |
what a waste of thumbs that are opposable
to make machines that are disposable -Ani DiFranco
More information about the Use-livecode