Re: [Way OT] perl, CGI, and sendmail

From: David (dbree_at_duo-county.com)
Date: 04/11/05

  • Next message: David: "Re: [Way OT] perl, CGI, and sendmail"
    Date: Sun, 10 Apr 2005 17:43:39 -0500
    To: debian-user@lists.debian.org
    
    

    On Sun, Apr 10, 2005 at 09:33:06PM +0000, Stephen Patterson wrote:
    > David <dbree@duo-county.com> writes:
    >
    > > 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).
    >
    > Check your apache error logs,

    As configured, they didn't shed much light on the subject - an example:

    127.0.0.1 - - [10/Apr/2005:14:25:47 -0500] "POST /cgi-bin/cgi.pl
    HTTP/1.1" 500 605 "http://localhost/~dlb/phprec/cgi-tst.html"
    "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.6) Gecko/20050406
    Firefox/1.0.2 (Debian package 1.0.2-3)" "-"

    This is the standard format that came with the Debian install of apache
    in sarge

    > and you probably don't want to be using
    > sendmail/exim directly (its cranky as hell). The perl module
    > Mail::Sender (libmail-sender-perl) makes sending email a cinch.

    I'll look into that. Actually I probably won't be dealing with cgi and
    emails. I'm just trying to learn a bit about it and get familiar with
    apache.

    FWIW, I just executed the cgi script directly from the command line
    followed by an "echo $?" which returned 0. The mail is in my spool and
    Exim again showed no errors. I'm sorta stumped as to what is going on.

    I added a "From: dlb@localhost.localdomain" and the script changed dlb
    to dlb.localdomain when I executed it from the command line, just as
    when it is executed from apache. It must be in the Perl handling of the
    addresses because this doesn't happen if I pipe an email generated from
    the command line into exim.

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: David: "Re: [Way OT] perl, CGI, and sendmail"

    Relevant Pages

    • Re: Apache and Perl in Windows
      ... The cgi scripts execute, ... I am studying a spider book that uses Perl so I ... > file in apache and rename the jar files in the server directory. ...
      (comp.lang.perl.misc)
    • Re: Help getting Perl/CGI running on OS X localhost with apache
      ... > I am trying to learn about perl and cgi. ... I have apache and php running ... Use a cgi-bin dir *outside* your document root. ...
      (comp.lang.perl.misc)
    • Re: Perl And Apache.
      ... > After UserID/Password authentication on a web page, does Apache store the ... > UserID in an environment variable that a Perl script could use? ... if you are using the CGI module, you have access to any html form ...
      (comp.lang.perl.misc)
    • Re: Server permission problems and SchAgent
      ... > windows, apache, cgi, scheduler, perl. ... > I was using a CGI script in an Apache2/Win2k ...
      (microsoft.public.scripting.vbscript)
    • Re: Server permission problems and SchAgent
      ... > windows, apache, cgi, scheduler, perl. ... > I was using a CGI script in an Apache2/Win2k ...
      (microsoft.public.scripting.wsh)