Jérôme Augé wrote:
On Thu, Jan 16, 2003 at 10:27:38AM +1100, Stas Bekman wrote:

Cool. Now can you please send the shortest possible example that you still get the SEGFAULT with, so I can reproduce it and fix? Thanks.

I finally got a working apache2+mod_perl working in my $HOME dir (I
could not find the core files of the RedHat httpd, problems with uid
permission i guess)

So here are the backtraces.

I included two backtraces :
- the first one is for the crash with $r->send_http_header()
- the second one is for the crash with $r->print() when I remove the
  send_http_header() statement
The problem is that you were calling these functions before the response phase (PerlTransHandler in your case), hence triggered the segfaults. I've fixed those in cvs. Now if you call any of these functions too early mod_perl will croak. Please verify with the latest cvs.

To solve your particular case, you need to use:

$r->set_handlers(PerlResponseHandler => \&response);

inside the PerlTransHandler handler, and move all the code that generates the response there.

Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com

Reply via email to