Re: New to ModPerl 2

[prev] [thread] [next] [Date index for 2004/11/16]

From: jonathan vanasco
Subject: Re: New to ModPerl 2
Date: 05:51 on 16 Nov 2004
Assuming this is a segfault, i get the same error:

[Tue Nov 16 00:45:17 2004] [notice] child pid 2237 exit signal Bus 
error (10)

The only difference is the env variable to ApacheCookie

This works:
==========================
#file:MyApache/Rocks.pm
#----------------------
package MyApache::Rocks;
#use strict;
#use warnings;
use Apache2;
use Apache2::mod_perl();
use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::Request ();
use Apache::Cookie();
use Apache::Const -compile => qw(OK);
sub handler
{
	my  $r 		= shift;
	my 	$req 	= Apache::Request->new( $r , DISABLE_UPLOADS=>1);
	my %cookiejar = Apache::Cookie::Jar->new( $r );
	$r->content_type('text/plain');
	print "mod_perl 2.0 rocks!\n";

	return Apache::OK;
}
1;

==========================

This does not
==========================
#file:MyApache/Rocks.pm
#----------------------
package MyApache::Rocks;
#use strict;
#use warnings;
use Apache2;
use Apache2::mod_perl();
use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::Request ();
use Apache::Cookie();
use Apache::Const -compile => qw(OK);
sub handler
{
	my  $r 		= shift;
	my 	$req 	= Apache::Request->new( $r , DISABLE_UPLOADS=>1);
	my %cookiejar = Apache::Cookie::Jar->new( $req );
	$r->content_type('text/plain');
	print "mod_perl 2.0 rocks!\n";

	return Apache::OK;
}
1;

On Nov 15, 2004, at 11:18 AM, Joe Schaefer wrote:

> Kurt Hansen <khansen@xxxxxxxxxx.xxx> writes:
>
> [...]
>
>> A few things that caused me more pain than I care to admit:
>>
>> 1. Apache::Cookie v2 requires an Apache::RequestRec environment
>> variable instead of an Apache::Request variable. Using the latter
>> caused a segmentation fault.
>
> If so, that's really a bug, not a portability issue.  Apache::Request
> objects are derived from Apache::RequestRec, so it should be ok to pass
> them to any Apache::Cookie methods which expect an Apache::RequestRec
> object.
>
> Can you please show us the code which segfaults?


        -- 
        Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

(message missing)

New to ModPerl 2
jonathan vanasco 19:26 on 14 Nov 2004

Re: New to ModPerl 2
Markus Wichitill 19:46 on 14 Nov 2004

Re: New to ModPerl 2
Kurt Hansen 21:05 on 14 Nov 2004

Re: New to ModPerl 2
Joe Schaefer 16:18 on 15 Nov 2004

Re: New to ModPerl 2
jonathan vanasco 05:51 on 16 Nov 2004

Re: New to ModPerl 2
Joe Schaefer 13:31 on 16 Nov 2004

Re: New to ModPerl 2
Kurt Hansen 21:06 on 14 Nov 2004

Re: New to ModPerl 2
Dan Brian 00:04 on 15 Nov 2004

Re: New to ModPerl 2
jonathan vanasco 00:42 on 15 Nov 2004

Re: New to ModPerl 2
jonathan vanasco 00:04 on 15 Nov 2004

Re: New to ModPerl 2
Jonathan Vanasco 16:21 on 16 Nov 2004

Re: New to ModPerl 2
Stef1 17:30 on 16 Nov 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52