You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Andrew O'Brien <an...@switchonline.com.au> on 2001/10/12 11:17:10 UTC

EMBPERL_MAIL_ERRORS_TO sends multiple emails?

Hi all,

  I'm just in the process of plugging holes in a server config,
  getting it ready to go live and played with EMBPERL_MAIL_ERRORS_TO
  for the first time.

  I've enabled optReturnError and set the appropriate ErrorDocument if
  this makes any difference.

  Everything now works great, except that I'm getting 3 copies of
  every error email. Has anyone else experienced this? The emails have
  different message IDs and all are sent one after the other.

  We're running a CVS version of Embperl: 1.3.4_dev-4 with SessionX,
  Apache/1.3.12 (Unix) Debian/GNU mod_ssl/2.6.4 OpenSSL/0.9.4
  mod_perl/1.24

  Relevant lines from the httpd.conf follow.

PerlTaintCheck On
PerlWarn On
PerlSetEnv EMBPERL_DEBUG 39862509
#PerlSetEnv EMBPERL_OPTIONS 8208
# 8208 + 262144 (optReturnError)
PerlSetEnv EMBPERL_OPTIONS 270352

PerlSetEnv EMBPERL_SESSION_CLASSES "Postgres Null Base64"
PerlSetEnv EMBPERL_SESSION_ARGS "DataSource=dbi:Pg:dbname=sessions;host=blah Transaction=1 Commit=1"
PerlSetEnv EMBPERL_OBJECT_HANDLER_CLASS Switch::EmbperlReq
PerlSetEnv EMBPERL_MAIL_ERRORS_TO andrewo+xavier_errors@switchonline.com.au

PerlRequire startup.pl
PerlFreshRestart On

PerlModule Apache::Registry
...
<VirtualHost blah:80>
...
    ErrorDocument 403 /login/index.html
    ErrorDocument 404 /notfound.html
    ErrorDocument 500 /error/index.html

    <Files *.epl>
	order deny,allow
	deny from all
    </Files>

    PerlSetEnv EMBPERL_COOKIE_DOMAIN	.switchsuper.com.au
    PerlSetEnv EMBPERL_COOKIE_PATH	/
    PerlSetEnv EMBPERL_COOKIE_EXPIRES	+7d

    PerlSetEnv EMBPERL_FILESMATCH	"\.html|\.epl$"
    PerlSetEnv EMBPERL_OBJECT_BASE	base.epl
    PerlSetEnv EMBPERL_OBJECT_STOPDIR	/home/andrewo/work/switchonline/www/public_html
    PerlSetEnv EMBPERL_OBJECT_ADDPATH	/home/andrewo/work/switchonline/www/public_html/defaults
    PerlSetEnv EMBPERL_OBJECT_FALLBACK	notfound.html

    <Location />
        SetHandler perl-script
        PerlHandler HTML::EmbperlObject

        Options ExecCGI SymLinksIfOwnerMatch
        AllowOverride None

	# use the access handler - default to open slather
	PerlAccessHandler Apache::AuthSwitchCookie
	
    </Location>

</VirtualHost>

  

-- 
 Andrew O'Brien                                                               
 Product Engineer                          email: andrewo@switchonline.com.au.
 Switch Online Group Pty Limited           phone: +61 2 9299 1133             
 ABN 89 092 286 327			     fax: +61 2 9299 1134             

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: EMBPERL_MAIL_ERRORS_TO sends multiple emails?

Posted by Gerald Richter <ri...@ecos.de>.
>
> What exactly do you mean by main page? The requested URI or the
> base.epl file?
>

Under EmbperlObject the base.epl. By main page I mean the outermost page
that calls all other pages.

>
> Well, it really  does :) I'll probably have time over the next few
> days to stick some debugging print statements in Embperl myself. If I
> don't turn up anything really useful then I'll send a copy of an
> embperl log for a request and my apache config.
>

ok, fine

> About the only thing I can think of that might make a difference is
> that I'm using EMBPERL_OBJECT_STOPDIR and most of the website epl
> structure files are in there.
>
That shouldn't make a difference

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: EMBPERL_MAIL_ERRORS_TO sends multiple emails?

Posted by Andrew O'Brien <an...@switchonline.com.au>.
On Wed, Oct 17, 2001 at 07:40:16AM +0200, Gerald Richter wrote:
> > >   getting it ready to go live and played with EMBPERL_MAIL_ERRORS_TO
> >
> > >   Everything now works great, except that I'm getting 3 copies of
> > >   every error email. Has anyone else experienced this? The emails have
> > >   different message IDs and all are sent one after the other.
> >
> > Right, after getting some time to look at this further I noticed that
> > Embperl was sending the error mail at the end of every Execute. ie in
> > epmain.c::EndOutput
> 
> but only if bAppendToMain is not set, so it should only be send at the end
> of the main page

What exactly do you mean by main page? The requested URI or the
base.epl file?

> > Most of my pages follow this basic outline:
> >
> > base.epl:
> >  Do init stuff
> >  Execute(layout.epl)
> >
> > layout.epl:
> >  Do layout stuff and somewhere in this do
> >  Execute(*) for the content
> >
> > It seems that even when I placed a "die" in base.epl the same error
> > page was being sent on the cleanup of *, of layout.epl and base.epl.
> >
> > Two questions:
> > 1. Is the error message ever different at any of these points? (I
> >    couldn't see any difference when I tested with errors in any of
> >    these places but I did only cause errors with die)
> 
> The last message may contains more errors, in case addtionaly errors occurs
> between the first and the last mail, but the last message will contain _all_
> errors.

Right. Thats about what I thought.

> > 2. If not, then what are the reasons against only sending the error
> >    mail at the end of base.epl and skipping it for the other nested
> >    Executes?
> 
> If Embperl really sends more than one mail in your case, then it's a bug in
> Embperl and I have to look deeper into it and fix it

Well, it really  does :) I'll probably have time over the next few
days to stick some debugging print statements in Embperl myself. If I
don't turn up anything really useful then I'll send a copy of an
embperl log for a request and my apache config.

About the only thing I can think of that might make a difference is
that I'm using EMBPERL_OBJECT_STOPDIR and most of the website epl
structure files are in there.

I'll post again in a day or so.

Thanks Gerald

-- 
 Andrew O'Brien                                                               
 Product Engineer                          email: andrewo@switchonline.com.au.
 Switch Online Group Pty Limited           phone: +61 2 9299 1133             
 ABN 89 092 286 327			     fax: +61 2 9299 1134             

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: EMBPERL_MAIL_ERRORS_TO sends multiple emails?

Posted by Gerald Richter <ri...@ecos.de>.
>
> >   getting it ready to go live and played with EMBPERL_MAIL_ERRORS_TO
>
> >   Everything now works great, except that I'm getting 3 copies of
> >   every error email. Has anyone else experienced this? The emails have
> >   different message IDs and all are sent one after the other.
>
> Right, after getting some time to look at this further I noticed that
> Embperl was sending the error mail at the end of every Execute. ie in
> epmain.c::EndOutput
>

but only if bAppendToMain is not set, so it should only be send at the end
of the main page

> Most of my pages follow this basic outline:
>
> base.epl:
>  Do init stuff
>  Execute(layout.epl)
>
> layout.epl:
>  Do layout stuff and somewhere in this do
>  Execute(*) for the content
>
> It seems that even when I placed a "die" in base.epl the same error
> page was being sent on the cleanup of *, of layout.epl and base.epl.
>
> Two questions:
> 1. Is the error message ever different at any of these points? (I
>    couldn't see any difference when I tested with errors in any of
>    these places but I did only cause errors with die)

The last message may contains more errors, in case addtionaly errors occurs
between the first and the last mail, but the last message will contain _all_
errors.

>
> 2. If not, then what are the reasons against only sending the error
>    mail at the end of base.epl and skipping it for the other nested
>    Executes?
>

If Embperl really sends more than one mail in your case, then it's a bug in
Embperl and I have to look deeper into it and fix it

Gerald



-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: EMBPERL_MAIL_ERRORS_TO sends multiple emails?

Posted by Andrew O'Brien <an...@switchonline.com.au>.
On Fri, Oct 12, 2001 at 07:17:10PM +1000, Andrew O'Brien wrote:

>   getting it ready to go live and played with EMBPERL_MAIL_ERRORS_TO

>   Everything now works great, except that I'm getting 3 copies of
>   every error email. Has anyone else experienced this? The emails have
>   different message IDs and all are sent one after the other.

Right, after getting some time to look at this further I noticed that
Embperl was sending the error mail at the end of every Execute. ie in
epmain.c::EndOutput

Most of my pages follow this basic outline:

base.epl:
 Do init stuff
 Execute(layout.epl)

layout.epl:
 Do layout stuff and somewhere in this do
 Execute(*) for the content

It seems that even when I placed a "die" in base.epl the same error
page was being sent on the cleanup of *, of layout.epl and base.epl.

Two questions:
1. Is the error message ever different at any of these points? (I
   couldn't see any difference when I tested with errors in any of
   these places but I did only cause errors with die)

2. If not, then what are the reasons against only sending the error
   mail at the end of base.epl and skipping it for the other nested
   Executes?

Cheers

-- 
 Andrew O'Brien                                                               
 Product Engineer                          email: andrewo@switchonline.com.au.
 Switch Online Group Pty Limited           phone: +61 2 9299 1133             
 ABN 89 092 286 327			     fax: +61 2 9299 1134             

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org