You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Doug MacEachern <do...@pobox.com> on 2000/02/17 01:30:12 UTC

Re: $r->filename and Apache::RegistryBB...

On Tue, 1 Feb 2000, Sean Chittenden wrote:

> 	Howdy.  Here's the background:  In my Transhandler, I'm setting the URI
> and setting the filename for use.  The filename is executed by
> Apache::RegistryBB, code cached, etc....  Things run smoothly until I ask a
> process for the file again....  things get ugly fast.
> 
> 	The error messages I'm getting are:
> 	[Tue Feb  1 12:02:36 2000] [error] Can't upgrade that kind of scalar at /usr/lib/perl5/site_perl/5.005/i686-linux-thread/Apache/RegistryBB.pm line 20.
> 	Attempt to free unreferenced scalar.
> 	[Tue Feb  1 12:02:30 2000] [notice] child pid 31687 exit signal Segmentation fault (11)
> 	Attempt to free unreferenced scalar at /usr/lib/perl5/site_perl/5.005/i686-linux-thread/Apache/PerlRun.pm line 256.
> 
> 	The only commonality through out this is the filename.  In my
> transhandler I'm setting the filename and returning OK:  
> 
> 	$r->filname('/www/docs/login' . $uri());
> 	return(OK);
> 
> 	I'm pretty sure that's not the problem, but I could be wrong.  I do
> know that when I stop using Apache::RegistryBB and use plain old Registry,
> things work with out a hitch, no segfaults in sight.  Any thoughts/ideas?

in the mod_perl source tree, add this to t/conf/httpd.conf
<Files ~ "\.bb$">
   PerlHandler          Apache::RegistryBB
   SetHandler perl-script
</Files>

and create this file called test.bb in t/docs:
shift->send_http_header;

print "hi\n";

the run:
% make start_httpd
% GET http://localhost:8529/test.bb
% perl -MLWP::Simple -e 'getprint "http://localhost:8529/test.bb" for 1..3'
(what do you see here?)
% make kill_httpd