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 <[EMAIL PROTECTED]> 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
