Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] Cant Figure Out Error Message

Expand Messages
  • Nathan.Jeffrey@dhs.vic.gov.au
    I d jam a whole bunch of redundant print staements in there, like printing to STDOUT as well as MAIL. And run it through the debugger, too. N Will
    Message 1 of 6 , Nov 5, 2002
    • 0 Attachment
      I'd jam a whole bunch of redundant print staements in there, like printing
      to STDOUT as well as MAIL. And run it through the debugger, too.

      N





      Will <self_deprecated@...>
      04/11/2002 09:28 PM
      Please respond to perl-beginner


      To: perl-beginner@yahoogroups.com
      cc:
      Subject: Re: [PBML] Cant Figure Out Error Message


      Nathan said ---> Can I get a copy of the output? ---

      I already corrected some of the code, but I am still
      getting those two error messages (in my error logs).
      The script (below) sends the email, and the email
      looks as one would expect it to turn out, but it just
      doesnt list anything in those two variables.

      Using CGI::Carp 'fatalsToBroswer'; wont yield any
      error messages in the browser, but in the error log it
      still shows up (also as quoted below).

      Dunno what's wrong yet, but I'm not done with it
      either. ;)

      Will

      --------------------------------------------------
      --- Nathan.Jeffrey@... wrote:
      > Hmm. It seems to be interpreting your quoted
      > strings as code. That's
      > damn odd.
      >
      >Are there any single periods on lines by themselves?
      That tends to terminate mail messages, IIRC. Can I get
      a copy of the output?
      >
      > N
      >
      >
      >
      >
      >
      >
      > Will <self_deprecated@...>
      > 02/11/2002 06:39 PM
      > Please respond to perl-beginner
      >
      >
      > To: Perl Beginner
      > <perl-beginner@yahoogroups.com>
      > cc:
      > Subject: [PBML] Cant Figure Out Error
      > Message
      >
      >
      > Greetings Folks,
      >
      > I am getting an error message I cant figure out. Can
      > someone tell me what I am doing wrong? Here it is:
      >
      >
      #####################################################
      >
      > Fri Nov 1 23:52:55 2002] [error] [client
      > xxx.xxx.xxx.xxx] File does not exist:
      > /home/xyz/public_html/500.shtml [Fri Nov 1 23:52:55
      > 2002] [error] [client xxx.xxx.xxx.xxx]
      > Premature end of script headers:
      > /home/xyz/public_html/cgi-bin/mail-form.cgi
      > Use of uninitialized value in concatenation (.) or
      > string at
      > /home/xyz/public_html/cgi-bin/mail-form.cgi
      > line 41.
      > Use of uninitialized value in concatenation (.) or
      > string at
      > /home/xyz/public_html/cgi-bin/mail-form.cgi
      > line 40.
      >
      >
      #####################################################
      >
      > Here's the actual script. The line numbers are next
      > to the comment in parentheses.
      >
      >
      #####################################################
      >
      > #!/usr/bin/perl -w
      >
      > ##### DECLARE MODULES #####
      >
      > use strict;
      > use CGI;
      >
      >
      > ##### DECLARE MODULE OBJECTS #####
      >
      > my $cgi = new CGI;
      >
      >
      > ##### DECLARE VARIABLES (14) #####
      >
      > my $mailprog = '/usr/sbin/sendmail';
      > my $recipient = 'webmaster@...';
      >
      > my $ip = $ENV{'REMOTE_ADDR'};
      > my $server_protocol = $ENV{'SERVER_PROTOCOL'};
      > my $host = $ENV{'REMOTE_HOST'};
      > my $referrer = $ENV{'HTTP_FROM'};
      >
      > my $name = $cgi->param("name");
      > my $email = $cgi->param("email");
      > my $message = $cgi->param("message");
      >
      >
      > ##### Now send mail to $recipient (29) #####
      >
      > open (MAIL, "|$mailprog -t") || die "Can't open
      > $mailprog!\n";
      > print MAIL "To: $recipient\n";
      > print MAIL "From: webserver\n";
      > print MAIL "Subject: Email From The Website\n\n";
      > print MAIL "FROM: $name at EMAIL: $email says:";
      > print MAIL "\n\n";
      > print MAIL "$message";
      > print MAIL "\n\n";
      > print MAIL "Server protocol: $server_protocol\n";
      > print MAIL "HTTP From: $referrer \n";
      > print MAIL "Remote host: $host \n";
      > print MAIL "Remote IP address: $ip\n";
      > close (MAIL);
      >
      > ##### PRINT A REDIRECT SCRIPT (46) #####
      > print
      >
      "Location:http://www.xyz.com/mailform-confirmation.htm";
      >
      >
      #####################################################
      >
      >
      > The script accepts input from an HTML form, and it
      > runs in so far as it will deliver the mail with all
      > the form fields, but it still spits out the error
      > message and wont redirect to the next page.
      >
      > Any help much appreciated.
      >
      > Thanks,
      >
      > Will
      >
      > __________________________________________________
      > Do you Yahoo!?
      > HotJobs - Search new jobs daily now
      > http://hotjobs.yahoo.com/
      >
      >
      > Unsubscribing info is here:
      > http://help.yahoo.com/help/us/groups/groups-32.html
      >
      > Your use of Yahoo! Groups is subject to
      > http://docs.yahoo.com/info/terms/
      >
      >
      >
      >
      >
      >
      >
      >
      _________________________________________________________________________________
      >
      > This email contains confidential information
      > intended only for the person named above and may be
      > subject to legal privilege. If you are not the
      > intended recipient, any disclosure, copying or use
      > of this information is prohibited. The Department
      > provides no guarantee that this communication is
      > free of virus or that it has not been intercepted or
      > interfered with. If you have received this email in
      > error or have any other concerns regarding its
      > transmission, please notify
      > Postmaster@...
      >
      _________________________________________________________________________________
      >
      >


      __________________________________________________
      Do you Yahoo!?
      HotJobs - Search new jobs daily now
      http://hotjobs.yahoo.com/


      Unsubscribing info is here:
      http://help.yahoo.com/help/us/groups/groups-32.html

      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/







      _________________________________________________________________________________

      This email contains confidential information intended only for the person named above and may be subject to legal privilege. If you are not the intended recipient, any disclosure, copying or use of this information is prohibited. The Department provides no guarantee that this communication is free of virus or that it has not been intercepted or interfered with. If you have received this email in error or have any other concerns regarding its transmission, please notify Postmaster@...
      _________________________________________________________________________________
    Your message has been successfully submitted and would be delivered to recipients shortly.