at the top of every page I have the following:

[- Execute({inputfile => '/usr/local/apache/share/GWCe.htm', mtime => 1, import
=> 1}); -]
[- ordpag(); exit if $GWCe::xitflg; -]

then I have something like the following in GWCe.htm
( these are snippets of code to give you an idea.  you cannot run this as it
stands):

[$sub ordpag$]
[-
   if(exists $fdat{CMD_updchkout}) {
      clccrt();
      $req_rec->no_cache(1);
      $req_rec->header_out("Pragma","no-cache");
      $req_rec->header_out("Cache-control","no-cache");
      if(@GWCe::ordlin){
         rdrrtn("http://www.genwax.com/candle_orders/cart.htm");
         return;
      }
    }
-]

[$sub rdrrtn $]
[-
   pcsuri($_[0]), $rdrloc=$GWCe::pcsuri;
   # i had written previously because i noticed that using http_headers_out
caused
less segfaults than the $req_rec version
   #use Apache;
   #use Apache::Constants qw(REDIRECT);
   #$req_rec->header_out("Location" => $rdrloc);
   #$req_rec->err_header_out("Location" => $rdrloc);
   #$req_rec->status(REDIRECT);
   $http_headers_out{'Location'} = "$rdrloc";
   exit;
-]

if I am doing something I should not be doing - let me know.

I was thinking that one way out of this problem would be to put
the following at the top of every page:
[- Execute({inputfile => '/usr/local/apache/share/GWCe.htm', mtime => 1, import
=> 1}); -]
[- ordpag($req_rec); exit if $GWCe::xitflg; -]

then put the following in GWCe.htm:
[$sub ordpag$]
[-
   $gwc_req_rec=shift;
   if(exists $fdat{CMD_updchkout}) {
      clccrt();
      $gwc_req_rec->no_cache(1);
      $gwc_req_rec->header_out("Pragma","no-cache");
      $gwc_req_rec->header_out("Cache-control","no-cache");
      if(@GWCe::ordlin){
         rdrrtn("http://www.genwax.com/candle_orders/cart.htm");
         return;
      }
    }
-]

etc..

thanks for the help,

cliff rayman
genwax.com

Gerald Richter wrote:

> >
> > I am getting losts of SIGV 11 VIOLATIONS.  I have been
> > pulling my hair out for several weeks.  It does not happen on startup
> > seems to happen only after a child has been running a while.
> >
> > I have reved up to latest and greatest. Rebuilt perl and everything
> > else from clean sources.  when I test it myself - everything runs
> > great.
> >
>
> Your stackbacktrace, looks like you are doing nested call's to sub's and
> inside you call $req_rec -> header_out, right?
> Look's like the pointer to the Apache request rec is invalid.
>
> If you do the call to $req_rec -> header_out on the top level of your page
> (i.e. before calling the subs), does it SIGSEGVs also? If not, could you
> print out the value of $$req_rec (note the _two_ dollar signs!) on the top
> level and inside every sub. Does this value change inside of a sub? Are the
> sub's imported from another file or are they defined within the same file?
>
> Gerald
>
> -------------------------------------------------------------
> Gerald Richter    ecos electronic communication services gmbh
> Internetconnect * Webserver/-design/-datenbanken * Consulting
>
> Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
> E-Mail:     [EMAIL PROTECTED]         Voice:    +49 6133 925151
> WWW:        http://www.ecos.de      Fax:      +49 6133 925152
> -------------------------------------------------------------

Reply via email to