Re: I do not understand the error CGI that I get CGI using Email:: Simple

2010-05-04 Thread Ricardo Signes
* fakessh fake...@fakessh.eu [2010-05-03T20:55:20]
 click error
 
 
 when I am not MIME:: Lite 
 I find myself with a CGI error in httpd and browser. 
 I do not understand why

What's the error?

  package PerlWebmail::Message;
  use base qw(MIME::Lite);
  use base qw(Email::Simple);

Extending both those classes at once seems doomed to fail a lot.

  sub mail 
  {
  my ($self, $message) = @_;
  my $obj = Email::Simple-new($message);
  print $obj-as_string;
  $Self-new;
  }

You said $Self instead of $self.

-- 
rjbs


Re: I do not understand the error CGI that I get CGI using Email:: Simple

2010-05-04 Thread fakessh
On Tue, 4 May 2010 07:41:26 -0400, Ricardo Signes
perl@rjbs.manxome.org wrote:
 * fakessh fake...@fakessh.eu [2010-05-03T20:55:20]
 click error
 
 
 when I am not MIME:: Lite 
 I find myself with a CGI error in httpd and browser. 
 I do not understand why
 
 What's the error?


I have a CGI error logs in httpd
[Tue May 04 14:14:59 2010] [error] [client 90.30.250.62] ModSecurity:
Unable to retrieve collection (name ip, key 90.30.250.62). Use
SecDataDir to define data directory first. [hostname mail.fakessh.eu]
[uri /webmail/] [unique_id qIh7H1diuugAAB1JIxoD]
[Tue May 04 14:15:03 2010] [error] [client 90.30.250.62] ModSecurity:
Unable to retrieve collection (name global, key global). Use SecDataDir
to define data directory first. [hostname mail.fakessh.eu] [uri
/webmail/] [unique_id qM1ueFdiuugAAB1CI9oB]
[Tue May 04 14:15:03 2010] [error] [client 90.30.250.62] ModSecurity:
Unable to retrieve collection (name ip, key 90.30.250.62). Use
SecDataDir to define data directory first. [hostname mail.fakessh.eu]
[uri /webmail/] [unique_id qM1ueFdiuugAAB1CI9oB]
[Tue May 04 14:15:04 2010] [error] [client 90.30.250.62] ModSecurity: Rule
execution error - PCRE limits exceeded (-8): (null). [hostname
mail.fakessh.eu] [uri /webmail/] [unique_id qM1ueFdiuugAAB1CI9oB]
[Tue May 04 14:15:10 2010] [error] [client 90.30.250.62] ModSecurity:
Unable to retrieve collection (name global, key global). Use SecDataDir
to define data directory first. [hostname mail.fakessh.eu] [uri
/webmail/] [unique_id q...@1diuugaab1xql4h]
[Tue May 04 14:15:10 2010] [error] [client 90.30.250.62] ModSecurity:
Unable to retrieve collection (name ip, key 90.30.250.62). Use
SecDataDir to define data directory first. [hostname mail.fakessh.eu]
[uri /webmail/] [unique_id q...@1diuugaab1xql4h]
[Tue May 04 14:15:10 2010] [error] [client 90.30.250.62] ModSecurity: Rule
execution error - PCRE limits exceeded (-8): (null). [hostname
mail.fakessh.eu] [uri /webmail/] [unique_id q...@1diuugaab1xql4h]
[Tue May 04 14:15:11 2010] [error] [client 90.30.250.62] Can't use string
(fake...@fakessh.eu) as a HASH ref while strict refs in use at
/usr/lib/perl5/vendor_perl/5.8.8/Email/Simple.pm line 100., referer:
http://mail.fakessh.eu/webmail/?encrypted=53616c7465645f5f7ac973deeb4df2fdbaab1fae755a502b6ab45f43258e8499d0af88df74e960eadfe072d0579fcea4b319e8f43a731e6b8e9a03a2a5efd00f7076eeb27aaf7b7f5eec059beaf0a3fb12e53bb9efa66a2bf141d5a224246d332eb35f5620c49f4a45c0a3a2124ea94e3dba89fb95ce9a5a799ec809951fa5e04d1dbe2b2616c2eed29d8b139792f9d884aeb2265725aa4c3309f51495c5afe37e41a2a438b315cd
[Tue May 04 14:15:11 2010] [error] [client 90.30.250.62] Premature end of
script headers: webmail.pl, referer:
http://mail.fakessh.eu/webmail/?encrypted=53616c7465645f5f7ac973deeb4df2fdbaab1fae755a502b6ab45f43258e8499d0af88df74e960eadfe072d0579fcea4b319e8f43a731e6b8e9a03a2a5efd00f7076eeb27aaf7b7f5eec059beaf0a3fb12e53bb9efa66a2bf141d5a224246d332eb35f5620c49f4a45c0a3a2124ea94e3dba89fb95ce9a5a799ec809951fa5e04d1dbe2b2616c2eed29d8b139792f9d884aeb2265725aa4c3309f51495c5afe37e41a2a438b315cd
^X


 
  package PerlWebmail::Message;
  use base qw(MIME::Lite);
  use base qw(Email::Simple);
 
 Extending both those classes at once seems doomed to fail a lot.
 

I can well use Email:: Simple in a CGI

  sub mail 
  {
  my ($self, $message) = @_;
  my $obj = Email::Simple-new($message);
  print $obj-as_string;
  $Self-new;
  }
 
 You said $Self instead of $self.

typographical error 
the correcting operation in the class is ok


Re: I do not understand the error CGI that I get CGI using Email:: Simple

2010-05-04 Thread Ricardo Signes
* fakessh fake...@fakessh.eu [2010-05-04T08:20:14]
 [Tue May 04 14:15:11 2010] [error] [client 90.30.250.62] Can't use string
 (fake...@fakessh.eu) as a HASH ref while strict refs in use at
 /usr/lib/perl5/vendor_perl/5.8.8/Email/Simple.pm line 100., referer:

This is a warning, not an error.

 [Tue May 04 14:15:11 2010] [error] [client 90.30.250.62] Premature end of
 script headers: webmail.pl, referer:

It looks like your program just isn't behaving correctly.

   package PerlWebmail::Message;
   use base qw(MIME::Lite);
   use base qw(Email::Simple);
  
  Extending both those classes at once seems doomed to fail a lot.
 
 I can well use Email:: Simple in a CGI

That is not the point.  You are trying to create a class that inherits from two
distinct and contradictory classes.  This will fail.

   sub mail 
   {
   my ($self, $message) = @_;
   my $obj = Email::Simple-new($message);
   print $obj-as_string;
   $Self-new;
   }
  
  You said $Self instead of $self.
 
 typographical error 
 the correcting operation in the class is ok

Don't retype fake code.  Show things that actually fail.

Your program, as shown, makes no sense and will never do anything useful.

-- 
rjbs


Re: I do not understand the error CGI that I get CGI using Email:: Simple

2010-05-03 Thread fakessh
click error


when I am not MIME:: Lite 
I find myself with a CGI error in httpd and browser. 
I do not understand why


On Tue, 04 May 2010 02:50:58 +0200, fakessh fake...@fakessh.eu wrote:
 hello all
 hello pep network
 hello guru of perl
 
 This class is named message
 this:
 
 [r...@r13151 ~]# cat
/usr/lib/perl5/site_perl/5.8.8/PerlWebmail/Message.pm
 package PerlWebmail::Message;
 use base qw(MIME::Lite);
 use base qw(Email::Simple);
 
 sub new
 {
   my $class = shift;
 
   my $self = $class-SUPER::new(@_);
 
   return $self;
 }
 
 sub mail 
 {
 my ($self, $message) = @_;
 my $obj = Email::Simple-new($message);
 print $obj-as_string;
 $Self-new;
 
 }
 
 1;