Gossamer Forum
Home : General : Perl Programming :

Apachee::SpeedLimit

Quote Reply
Apachee::SpeedLimit
Hi:

I want to add something to my site to catch those who might be mass-downloading pages all at once. Seems like SppeLimit would do it, but I cannof get it to work.

I installed it OK, and see that it needs IPC::Sharable... which I also installed fine. When I try and run it on a test server, I get this error:

[Mon Sep 30 12:13:11 2002] [error] Undefined subroutine &IPC::SysV::SEM_UNDO called at /usr/local/lib/perl5/site_perl/5.8.0/IPC/Shareable.pm line 45.
Compilation failed in require at /usr/local/lib/perl5/site_perl/5.8.0/i386-freebsd/Apache/SpeedLimit.pm line 9.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.8.0/i386-freebsd/Apache/SpeedLimit.pm line 9.
Compilation failed in require at (eval 81) line 3.

which leads me to beleive that the problem is in IPC::SysV

I Reinstalled perl 5.8, and during the install, I noticed (during test) that all the IPC modules returned "Not Tested on this platform." I tried to install IPC seperately through CPAN, and that fails, too.

So, is IPC something that does not work (properly) on FreeBSD? So, does this make SpeedLimit not an option for me (FreeBSD 4.6, Apache 1.3.26).

What other options would I have to limit an IP to, oh, say 40 d/l's a minute, and cut them off for an hour if they exceed that?

Thanks!

dave
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Apachee::SpeedLimit In reply to
Try installing it manually. Download IPC::Shareable from:

http://mirrors.gossamer-threads.com/...dules/by-module/IPC/

and then untar it and run perl Makefile.PL, make, then make test, then make install. See what sort of errors you get.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Apachee::SpeedLimit In reply to
Alex:



Will give it a shot tomorrow- and let you know!



BTW, you KNOW which mirror I use for CPAN!!! It is certianly more reliable than the mirror in my own city!
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Apachee::SpeedLimit In reply to
Hi Alex:



OK, did what you suggested. Made the make file, and ran make fine. Then I ran make test, and that failed horribly. Sample of the out:



PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00base......Undefined subroutine &IPC::SysV::SEM_UNDO called at /usr/local/IPC-Shareable-0.60/blib/lib/IPC/Shareable.pm line 45.
Compilation failed in require at t/00base.t line 9.
BEGIN failed--compilation aborted at t/00base.t line 9.
t/00base......dubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 1-11
Failed 11/11 tests, 0.00% okay
t/05sv........Undefined subroutine &IPC::SysV::SEM_UNDO called at /usr/local/IPC-Shareable-0.60/blib/lib/IPC/Shareable.pm line 45.
Compilation failed in require at t/05sv.t line 9.
BEGIN failed--compilation aborted at t/05sv.t line 9.



Which (again) makes me think it was the IPC::SysV...



So I grabbed that, and did the same thing. THAT install failed in make, here is the errors:



cp Msg.pm blib/lib/IPC/Msg.pm
cp Semaphore.pm blib/lib/IPC/Semaphore.pm
cp SysV.pm blib/lib/IPC/SysV.pm
/usr/bin/perl /usr/local/lib/perl5/5.8.0/ExtUtils/xsubpp -typemap /usr/local/lib/perl5/5.8.0/ExtUtils/typemap SysV.xs > SysV.xsc && mv SysV.xsc SysV.c
cc -c -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include -O -DVERSION=\"1.03\" -DXS_VERSION=\"1.03\" -DPIC -fpic "-I/usr/local/lib/perl5/5.8.0/i386-freebsd/CORE" SysV.c
SysV.xs: In function `XS_IPC__Msg__stat_pack':
SysV.xs:69: storage size of `ds' isn't known
SysV.xs: In function `XS_IPC__Msg__stat_unpack':
SysV.xs:89: dereferencing pointer to incomplete type
SysV.xs:92: dereferencing pointer to incomplete type
SysV.xs:95: dereferencing pointer to incomplete type
SysV.xs:97: dereferencing pointer to incomplete type
SysV.xs:99: dereferencing pointer to incomplete type
SysV.xs:101: dereferencing pointer to incomplete type
SysV.xs:103: dereferencing pointer to incomplete type
SysV.xs:105: dereferencing pointer to incomplete type
SysV.xs:107: dereferencing pointer to incomplete type
SysV.xs:109: dereferencing pointer to incomplete type
SysV.xs:111: dereferencing pointer to incomplete type
SysV.xs:113: dereferencing pointer to incomplete type
SysV.xs:115: dereferencing pointer to incomplete type
SysV.xs:117: dereferencing pointer to incomplete type
SysV.xs: In function `XS_IPC__Semaphore__stat_unpack':
SysV.xs:135: dereferencing pointer to incomplete type
SysV.xs:138: dereferencing pointer to incomplete type
SysV.xs:140: arithmetic on pointer to an incomplete type
SysV.xs:140: dereferencing pointer to incomplete type
SysV.xs:141: arithmetic on pointer to an incomplete type
SysV.xs:141: dereferencing pointer to incomplete type
SysV.xs:142: arithmetic on pointer to an incomplete type
SysV.xs:142: dereferencing pointer to incomplete type
SysV.xs:143: arithmetic on pointer to an incomplete type
SysV.xs:143: dereferencing pointer to incomplete type
SysV.xs:144: arithmetic on pointer to an incomplete type
SysV.xs:144: dereferencing pointer to incomplete type
SysV.xs:145: arithmetic on pointer to an incomplete type
SysV.xs:145: dereferencing pointer to incomplete type
SysV.xs:146: arithmetic on pointer to an incomplete type
SysV.xs:146: dereferencing pointer to incomplete type
SysV.xs:147: arithmetic on pointer to an incomplete type
SysV.xs:147: dereferencing pointer to incomplete type
SysV.xs: In function `XS_IPC__Semaphore__stat_pack':
SysV.xs:158: storage size of `ds' isn't known
SysV.xs: In function `XS_IPC__SysV_ftok':
SysV.xs:192: `sv_undef' undeclared (first use in this function)
SysV.xs:192: (Each undeclared identifier is reported only once
SysV.xs:192: for each function it appears in.)
*** Error code 1



Any ideas on where to go now?



Thank you- I am totally lost!



dave
dave

Big Cartoon DataBase
Big Comic Book DataBase