Re: Can't locate object method "dir_config" via package "Apache::RegistryFilter"
- Original Message - From: "Randy Kobes" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "mod_Perl" <[EMAIL PROTECTED]> Sent: Saturday, December 22, 2001 5:51 PM Subject: Re: Can't locate object method "dir_config" via package "Apache::RegistryFilter" > - Original Message - > > > Date: Tue, 18 Dec 2001 11:32:24 +0100 > > From: Gerald Menzel <[EMAIL PROTECTED]> > > To: [EMAIL PROTECTED] > > Subject: Can't locate object method "dir_config" via package > > "Apache::RegistryFilter" > > > > I have a problem with Apache::RegistryFilter. I can't get it to work. > > If I try to use it I allways get this error message: > > > > [error] Can't locate object method "dir_config" via package > > "Apache::RegistryFilter" ´ > > (perhaps you forgot to load "Apache::RegistryFilter"?) at > > C:/Programme/Perl/site/lib/Apache/RegistryFilter.pm line 17. > > > > Excerpt of my perl.conf: > > > > PerlModule Apache::Filter > > PerlModule Apache::RegistryFilter > > > > PerlSetVar Filter on > > SetHandler perl-script > > PerlHandler Apache::RegistryFilter > > Options +ExecCGI > > > > Hi, > You have to specify the chain of filters in httpd.conf. > Here's an example that takes the output of a script > "test.pl" and filters it through Apache::Reverse, which > simple reverses the order of the lines test.pl prints out. > In httpd.conf: > > PerlModule Apache::Filter > PerlModule Apache::RegistryFilter > PerlModule Apache::Reverse > > SetHandler perl-script > PerlSetVar Filter on > PerlHandler Apache::RegistryFilter Apache::Reverse > Options +ExecCGI > > > The script "test.pl" in the /Apache/htdocs/filter directory is > ** > use strict; > print <<"END"; > LINE 1 > LINE 2 > LINE 3 > END > ** > while the perl module Apache::Reverse is > ** > package Apache::Reverse; > use strict; > use Apache::Constants qw(:common); > sub handler { > my $r = shift->filter_register; > my ($fh, $status) = $r->filter_input(); > $r->content_type("text/html"); > $r->send_http_header; > print reverse <$fh>; > warn "Status is $status"; > return OK; > } > 1; > ** > Does this work for you? > > best regards, > randy kobes > > Thanks Randy, I have tested this "save" configuration but the same error still appears. I can't figure out why. It would be great if you can help me! bb, Gerald Menzel.
Re: Can't locate object method "dir_config" via package "Apache::RegistryFilter"
Sorry Anand, but this don't help me, because I want to use Apache::Filter for parsing the output of cgi-scripts. bb, Gerald Menzel. > This should help you, > > > SetHandler perl-script > PerlHandler Apache::Registry > Options +ExecCGI > PerlSendHeader On > > > Regards, > Anand > > Quoting Gerald Menzel <[EMAIL PROTECTED]>: > > > Hi, > > > > I have a problem with Apache::RegistryFilter. I > > can't get it to work. > > If I try to use it I allways get this error > > message: > > > > [error] Can't locate object method "dir_config" > > via package > > "Apache::RegistryFilter" ´ > > (perhaps you forgot to load > > "Apache::RegistryFilter"?) at > > C:/Programme/Perl/site/lib/Apache/RegistryFilter.pm > > line 17. > > > > > > Excerpt of my perl.conf: > > > > PerlModule Apache::Filter > > PerlModule Apache::RegistryFilter > > > > PerlSetVar Filter on > > SetHandler perl-script > > PerlHandler Apache::RegistryFilter > > Options +ExecCGI > > > > > > > > What's wrong? I've searched the net for an > > explanation of this error but I > > don't found anything relevant. I am not an > > expert of all that Apache/Perl > > stuff, so I hope that someone here can help me. > > > > bb, Gerald Menzel. > > > > > > > With Regards, > > Anand Ratnasabapathy, > DSM Soft(P)Ltd, > No:25,Nungambakkam High Road, > Chennai - 600 034. >
Can't locate object method "dir_config" via package "Apache::RegistryFilter"
Hi, I have a problem with Apache::RegistryFilter. I can't get it to work. If I try to use it I allways get this error message: [error] Can't locate object method "dir_config" via package "Apache::RegistryFilter" ´ (perhaps you forgot to load "Apache::RegistryFilter"?) at C:/Programme/Perl/site/lib/Apache/RegistryFilter.pm line 17. Excerpt of my perl.conf: PerlModule Apache::Filter PerlModule Apache::RegistryFilter PerlSetVar Filter on SetHandler perl-script PerlHandler Apache::RegistryFilter Options +ExecCGI What's wrong? I've searched the net for an explanation of this error but I don't found anything relevant. I am not an expert of all that Apache/Perl stuff, so I hope that someone here can help me. bb, Gerald Menzel.
Re: submit-data and chained handlers
> > e.g. $r->read($in,$r->header_in('Content-length')); > > or $in=$r->content(); > > give's my handler the data, but unfotunately exclusive - so the data don't > > reaches Apache::Registry and the cgi-script. > > > > Any suggests? > > Apache::RequestNotes. > - Perrin > No, Apache::RequestNotes doesn't solve my problem. Please look at this: SetHandler perl-script PerlHandler Apache::qwerty Apache::ChainBuffer Apache::Registry Options +ExecCGI PerlSendHeader On Apache::Registry processes ordinary cgi-scripts, Apache::ChainBuffer buffers the generated content and Apache::qwerty have to parse and/or modify the whole content. All this works fine. But Apache::qwerty also have to get at the data submitted by the browser in POST/PUT requests. The Eagle Book discribes how to use the $r->read() or $r->content() function to read the data from STDIN, but using one of this functions befor the Apache::Registry handler is involved clears the data buffer and the cgi-scripts don't run correctly. If I use one of this functions after Apache::Registry is called, the data buffer is allready cleared and so Apache::qwerty can't get at the data. Apache::RequestNotes don't work because Apache::Registry expect to read the POST/PUT-data from STDIN. It's important that the cgi-scripts run unmodified and without any notice of their "unnaturally" environment. bb, Gerald Menzel.
Re: submit-data and chained handlers
> > e.g. $r->read($in,$r->header_in('Content-length'));> > or $in=$r->content();> > give's my handler the data, but unfotunately exclusive - so the data don't> > reaches Apache::Registry and the cgi-script.> >> > Any suggests?>> Apache::RequestNotes.> - Perrin>I use Win2k and it seems there is no Win32 port of libapreq!? Exists anyother way?
submit-data and chained handlers
Hi, I have two stacked content handlers in a pipeline. At first Apache::Registry and as the second my own handler for parsing Apache::Registry's output of ordinary Perl scripts. Works fine. But I want to catch everything that passes in or out Apache::Registry - also the data of submit-forms sent to the cgi-scripts by the client. I have tried different ways but I can't figure out how (or whether) that's possible. e.g. $r->read($in,$r->header_in('Content-length')); or $in=$r->content(); give's my handler the data, but unfotunately exclusive - so the data don't reaches Apache::Registry and the cgi-script. Any suggests? Thanks. Gerald Menzel.