C. Abney cabney at
Fri Feb 25 12:46:28 CST 2000

On Fri, 25 Feb 2000, Joel Fentin wrote:

> apache: [Wed Feb 23 21:03:16 2000] [error] [client]
> script not found or unable to stat:
> /u/web/theede/cgi-local/

> apache: [Wed Feb 23 21:03:46
> 2000] [error] [client] Premature end of script
> headers:
> /u/web/theede/cgi-local/


Ok, the others have done most of the work, but I just want to add a 
couple of my own comments.  If you'll notice how I separated the
above text, you provided us with two error messages from your apache
error log (you have access to the error log of the web-server. That's
Good!!!)  In the first entry it looks like you tried to access the
wrong file.  Remember, Unix is Case-Sensitive and you should always
be watching for errors like that.  The second message may or may not
have been a successful execution of your perl script (I'm not too 
sure about this it's been awhile) but because you used the cut down
version of the script maybe(?) there is NO text provided to the web-
server to return to the browser.  You might want to send a happy
message to your surfer-user (and yourself <g>) indicating the status
of the attempted email.

I've indicated a few additions (minus the changes everyone else suggests,
you should of course abide by their word as well.) This is just bare
bones, someone else might suggest a better way to catch your errors,
but this'll at least keep you focused on the content of your pages.
I'd suggest putting the contents of '$!' into your page but you wouldn't
want to do that for something you planned on putting up on the web <g>.

> #!/usr/local/bin/perl
> use CGI qw(:cgi-lib :standard);

print	"Content-type: text/html\n\n",
	"<HTML><HEAD><TITLE>Mail Results</TITLE></HEAD>\n<BODY><center>\n";

> open
> (SENDMAIL,"|/USER/LIB/sendmail -oi -t -odg")

# I removed the above trailing semicolon for this:
	or print "<p>Problems, contact your administrator.</p>\n";

> print SENDMAIL
> <<"EOF";
> From: joel at
> To: joel at
> Subject: Mail
> Test
> This is the message body.
> close (SENDMAIL)

# trailing semicolon also trimmed above...
	or print "<p>Wierd error, contact your administrator.</p>\n";
print "<p>Transaction Complete</p>\n</center></BODY>\n</HTML>\n";

Einstein himself said that God doesn't roll dice. But he was wrong. And
in fact, anyone who has played role-playing games knows that God
probably had to roll quite a few dice to come up with a character like
Einstein.  -- Larry Wall                                     C. Abney


The posting address is: san-diego-pm-list at

List requests should be sent to: majordomo at

If you ever want to remove yourself from this mailing list,
you can send mail to <majordomo at> with the following
command in the body of your email message:

    unsubscribe san-diego-pm-list

If you ever need to get in contact with the owner of the list,
(if you have trouble unsubscribing, or have questions about the
list itself) send email to <owner-san-diego-pm-list at> .
This is the general rule for most mailing lists when you need
to contact a human.

More information about the San-Diego-pm mailing list