mysql

2004-07-03 Thread David Arnold
All, What should I be reading if I want to learn how to use modperl 2.0 with mysql? -- 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

Re: Apache::File again

2004-07-03 Thread Stas Bekman
David Arnold wrote: All, I tried to follow an earlier suggestion (http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apache__File_), but failed to figure out what to do. I have this: use Apache::File; And later this: my $fh=Apache::File->new($r->filename); unless($fh) { $log

Apache::File again

2004-07-03 Thread David Arnold
All, I tried to follow an earlier suggestion (http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apache__File_), but failed to figure out what to do. I have this: use Apache::File; And later this: my $fh=Apache::File->new($r->filename); unless($fh) { $log->warn("Cannot

Re: On-the-Fly

2004-07-03 Thread Stas Bekman
David Arnold wrote: Stas, Here's a little report to answer your questions below about my error_log: With: PerlAccessHandler 'sub {\ return Apache::Const::FORBIDDEN\ unless shift->connection->remote_ip=~m/^\Q10.3.4./;\

Re: Declaring constant

2004-07-03 Thread Stas Bekman
David Arnold wrote: All, I don't believe I've seen this syntax before? use constant SECRET_LENGTH => 14; Anyone have any pointers to an explanation of this syntax? http://perldoc.com/perl5.8.4/pod/perldata.html#List-value-constructors It is often more readable to use the => operator between key/va

Re: On-the-Fly

2004-07-03 Thread Stas Bekman
David Arnold wrote: Stas et al, OK. Gave this a try: file:MyApache/BlockByIP.pm -- package MyApache::BlockByIP; use strict; use warnings; use Apache::RequestRec (); use Apache::Connection (); use Apache::Const -compile => qw(FORBIDDEN OK); my %

Declaring constant

2004-07-03 Thread David Arnold
All, I don't believe I've seen this syntax before? use constant SECRET_LENGTH => 14; Anyone have any pointers to an explanation of this syntax? -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/m

Re: On-the-Fly

2004-07-03 Thread David Arnold
Stas et al, OK. Gave this a try: file:MyApache/BlockByIP.pm -- package MyApache::BlockByIP; use strict; use warnings; use Apache::RequestRec (); use Apache::Connection (); use Apache::Const -compile => qw(FORBIDDEN OK); my %bad_ips = map {$_

Re: On-the-Fly

2004-07-03 Thread David Arnold
Stas, Here's a little report to answer your questions below about my error_log: With: PerlAccessHandler 'sub {\ return Apache::Const::FORBIDDEN\ unless shift->connection->remote_ip=~m/^\Q10.3.4./;\

Re: [mp2] Can't locate ModPerl/Registry/handler.pm

2004-07-03 Thread Stas Bekman
[modperl users is the right list to post this kind of questions, Jørgen] Jørgen Thomsen wrote: Why do I have to create this file by hand ? I took Registry.pm and created it as Registry/handler.pm and apparently got it working, but after a lot of trial and error ! Apache 2.0.49 Perl 5.8.0 Linux mod

Re: On-the-Fly

2004-07-03 Thread Stas Bekman
[David, don't forget to hit reply-all] Thanks. Line continuation! I now have this in my httpd.conf: PerlAccessHandler 'sub {\ return Apache::Const::FORBIDDEN\ unless shift->connection->remote_ip=~m/^\Q10.3.4./;\

Re: On-the-Fly

2004-07-03 Thread Stas Bekman
David Arnold wrote: All, Tried this in my httpd.conf: PerlAccessHandler 'sub { return Apache::Constants::FORBIDDEN unless shift->connection->remote_ip=~m/^\Q10.3.4./; }' But got this error when

On-the-Fly

2004-07-03 Thread David Arnold
All, Tried this in my httpd.conf: PerlAccessHandler 'sub { return Apache::Constants::FORBIDDEN unless shift->connection->remote_ip=~m/^\Q10.3.4./; }' But got this error when I tried to resta

Re: Apache::File

2004-07-03 Thread Stas Bekman
David Arnold wrote: All, In modperl 2.0, what should I use in place of Apache::File? Find the method that you want here: http://perl.apache.org/docs/2.0/user/porting/compat.html -- __ Stas BekmanJAm_pH --> Just Another

Apache::File

2004-07-03 Thread David Arnold
All, In modperl 2.0, what should I use in place of Apache::File? -- 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

Re: Cookbook Question

2004-07-03 Thread Geoffrey Young
David Arnold wrote: > All, > > I am working on Recipe 3.4. I have the following saved as cgi-perl/try.pl: > > #! /usr/bin/perl -w > # file: try.pl > > use strict; > use Apache::Const qw(:common); > > my $r=shift; > > # Grab all of the headers at once > my %headers_in=$r->headers_in; > > # o