Apache::RefererBlock and ModuleConfig problem?
Ok, I've been banging my head on this one for a while. A friend asked me to look into this as a favor, and it's turned into two weeks of beating my head against stuff I don't understand. I installed his apache (1.3.11), and I even installed it with mod_perl, no problems. perl Makefile.PL had it use the src directory specified, had it build httpd for me make make install when it was done, an httpd -l showed mod_perl in there. I copied that httpd binary to his current working install, and then installed the Apache::RefererBlock stuff. untar, and then did what the instructions said to do perl Makefile.PL make make install Again, zero problems. I add the lines to httpd.conf, straight from the example on the webpage and doc files PerlModule Apache::RefererBlock PerlFixupHandler Apache::RefererBlock RefBlockMimeTypes image/gif image/jpeg RefBlockAllowed http://www.domain.com http://domain.com RefBlockRedirect http://badpeaple.com http://www.domain.com/redirect/test2.jpg RefBlockRedirect http://www.badpeople2.com/ http://www.domain.com/test2.jpg RefBlockDebug On I then issue a configtest and I get Syntax error on line 864 of /usr/local/apache/conf/httpd.conf: Can't locate loadable object for module Apache::ModuleConfig in @INC (@INC contains: /usr/local/lib/perl5/5.6.0/i686-linux /usr/local/lib/perl5/5.6.0 /usr/local/lib/perl5/site_perl/5.6.0/i686-linux /usr/local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl . /usr/local/apache/ /usr/local/apache/lib/perl) at /usr/local/lib/perl5/site_perl/5.6.0/i686-linux/mod_perl.pm line 14 Compilation failed in require at /usr/local/lib/perl5/site_perl/5.6.0/i686-linux/Apache/RefererBlock.pm line 3. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.6.0/i686-linux/Apache/RefererBlock.pm line 3. Compilation failed in require at (eval 4) line 3. (line 864, btw is the FixUpHandler line) I've reinstalled, gone back through all the steps. I just don't get it. I don't understand how it all made, tested, and installed just fine, but when I go to use it, it errors out. I'm not even remotely close to being able to understand this...but I was made to believe that Apache::RefererBlock was pretty easy to implement, and mod_perl installed so easily, I figured it was worth a shot. Am I just missing something REALLY stupid? Any advice, help appreciated. Redhat 6.2, apache 1.3.12, mod_perl-1.24, Apache::RefererBlock-0.03 And as asked for in the support doc - perl -V: [root@www mod_perl-1.24]# perl -V Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration: Platform: osname=linux, osvers=2.2.12-20smp, archname=i686-linux uname='linux www.bearpress.com 2.2.12-20smp #1 smp mon sep 27 10:34:45 edt 1999 i686 unknown ' config_args='-de' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef Compiler: cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) cppflags='-fno-strict-aliasing -I/usr/local/include' ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' stdchar='char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt libc=/lib/libc-2.1.2.so, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under linux Compiled at Jul 18 2000 16:48:51 @INC: /usr/local/lib/perl5/5.6.0/i686-linux /usr/local/lib/perl5/5.6.0 /usr/local/lib/perl5/site_perl/5.6.0/i686-linux /usr/local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl And all make tests work 100% Alex, tired and off in search of coffee [Alexander Darke]-[[EMAIL PROTECTED]]--[http://www.darke.net/] ["All the best people in life seem to like LINUX." - Steve Wozniak] [---[El hombre y el oso, cuanto mas peludo mas hermoso]---] [--[Visit Woof Watch! http://www.woofwatch.com/ ]-]
RE: Apache::RefererBlock and ModuleConfig problem?
[EMAIL PROTECTED] (Geoffrey Young) wrote: From: Matt Sergeant [mailto:[EMAIL PROTECTED]] Which raises an interesting question... Is there any way for Makefile.PL to determin if a particular option was enabled at mod_perl build time? I've tried to do this, but without success. From what I can tell, you need a live server to tie into mod_perl::hooks() to get them, and that's the only way. Hopefully, the stuff Ken Williams is doing with Apache::test will make writing live tests easier... That would be a nice feature, yes. I'm not sure how to look at an apache binary with config file and figure out which mod_perl options it was compiled with. Anyone know whether this is possible, or would some hacking have to be done first?
Re: Apache::RefererBlock and ModuleConfig problem?
On Thu, Aug 03, 2000 at 01:27:17PM +0100, Matt Sergeant wrote: On Thu, 3 Aug 2000, Geoffrey Young wrote: you need to specify EVERYTHING=1 or PERL_DIRECTIVE_HANDLERS=1 to enable Apache::ModuleConfig, ie perl Makefile.PL EVERYTHING=1 make etc... Which raises an interesting question... Is there any way for Makefile.PL to determin if a particular option was enabled at mod_perl build time? 'http://site/perl-status?hooks' ? -- I let my mind wander and it didn't come back... Mike Hall, Unix Admin - Rock Island Communications [EMAIL PROTECTED] System Admin - riverside.org[EMAIL PROTECTED]
RE: Apache::RefererBlock and ModuleConfig problem?
-Original Message- From: Michael Hall [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 03, 2000 1:23 PM To: [EMAIL PROTECTED] Subject: Re: Apache::RefererBlock and ModuleConfig problem? On Thu, Aug 03, 2000 at 01:27:17PM +0100, Matt Sergeant wrote: On Thu, 3 Aug 2000, Geoffrey Young wrote: you need to specify EVERYTHING=1 or PERL_DIRECTIVE_HANDLERS=1 to enable Apache::ModuleConfig, ie perl Makefile.PL EVERYTHING=1 make etc... Which raises an interesting question... Is there any way for Makefile.PL to determin if a particular option was enabled at mod_perl build time? 'http://site/perl-status?hooks' ? that's for run time - we're looking for a way to discover enabled hooks that doesn't require a running server. --Geoff -- I let my mind wander and it didn't come back... Mike Hall, Unix Admin - Rock Island Communications [EMAIL PROTECTED] System Admin - riverside.org [EMAIL PROTECTED]
RE: Apache::RefererBlock and ModuleConfig problem?
[EMAIL PROTECTED] (Geoffrey Young) wrote: -Original Message- From: Michael Hall [mailto:[EMAIL PROTECTED]] On Thu, Aug 03, 2000 at 01:27:17PM +0100, Matt Sergeant wrote: Which raises an interesting question... Is there any way for Makefile.PL to determin if a particular option was enabled at mod_perl build time? 'http://site/perl-status?hooks' ? that's for run time - we're looking for a way to discover enabled hooks that doesn't require a running server. I did a little checking, and now my guess is that there isn't a way. Have a look at the C code that checks whether hooks exists (in perl_config.c): int perl_hook(char *name) { switch (*name) { case 'A': if (strEQ(name, "Authen")) #ifdef PERL_AUTHEN return 1; #else return 0; #endif if (strEQ(name, "Authz")) #ifdef PERL_AUTHZ return 1; #else return 0; #endif ... Not exactly a hash lookup. =) So currently the only way it would be possible to check for the presence of various hooks would be to start up a copy of the server and check mod_perl::hook() for each required hook. This task, though ugly, would be greatly simplified by using the patches I submitted for Apache::test. Then it could feasibly be done at Makefile.PL time, but might more naturally go into one of the 'make test' tests.
RE: Apache::RefererBlock and ModuleConfig problem?
On Thu, 3 Aug 2000, Ken Williams wrote: [EMAIL PROTECTED] (Geoffrey Young) wrote: From: Matt Sergeant [mailto:[EMAIL PROTECTED]] Which raises an interesting question... Is there any way for Makefile.PL to determin if a particular option was enabled at mod_perl build time? I've tried to do this, but without success. From what I can tell, you need a live server to tie into mod_perl::hooks() to get them, and that's the only way. Hopefully, the stuff Ken Williams is doing with Apache::test will make writing live tests easier... That would be a nice feature, yes. I'm not sure how to look at an apache binary with config file and figure out which mod_perl options it was compiled with. Anyone know whether this is possible, or would some hacking have to be done first? Hmm, does this help: http://perl.apache.org/guide/install.html#Discovering_whether_some_option_ _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://perl.org http://stason.org/TULARC http://singlesheaven.com http://perlmonth.com http://sourcegarden.org
RE: Apache::RefererBlock and ModuleConfig problem?
[EMAIL PROTECTED] (Stas Bekman) wrote: On Thu, 3 Aug 2000, Ken Williams wrote: [EMAIL PROTECTED] (Geoffrey Young) wrote: From: Matt Sergeant [mailto:[EMAIL PROTECTED]] Which raises an interesting question... Is there any way for Makefile.PL to determin if a particular option was enabled at mod_perl build time? I've tried to do this, but without success. From what I can tell, you need a live server to tie into mod_perl::hooks() to get them, and that's the only way. Hopefully, the stuff Ken Williams is doing with Apache::test will make writing live tests easier... That would be a nice feature, yes. I'm not sure how to look at an apache binary with config file and figure out which mod_perl options it was compiled with. Anyone know whether this is possible, or would some hacking have to be done first? Hmm, does this help: http://perl.apache.org/guide/install.html#Discovering_whether_some_option_ I hadn't thought of that, but as the guide mentions it won't work for stripped binaries (which is the most common case, apparently). I'd like something general that I can put into Apache::test to allow people to integrate a check like this into their modules' installation procedures.