Re: Regarding modperl installation (fwd)
Hmm maybe someone can tell me what I am doing wrong ??? Mithun -- Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Platform: osname=linux, osvers=2.2.5-22smp, archname=i386-linux uname='linux porky.devel.redhat.com 2.2.5-22smp #1 smp wed jun 2 09:11:51 edt 1999 i686 unknown ' hint=recommended, useposix=true, d_sigaction=define usethreads=undef useperlio=undef d_sfio=undef Compiler: cc='cc', optimize='-O2 -m486 -fno-strength-reduce', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include' ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include' stdchar='char', d_stdstdio=undef, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 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 -ldl -lm -lc -lposix -lcrypt libc=, 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): Built under linux Compiled at Feb 2 2000 15:35:58 @INC: /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 . PERLLOCAL(1) User Contributed Perl Documentation PERLLOCAL(1) the _M_D_5 manpage +o installed into: /usr/lib/perl5/site_perl/5.005 +o LINKTYPE: dynamic +o VERSION: 1.7 +o EXE_FILES: 3/Feb/2000 perl 5.005, patch 03 1 --- The following were downloaded first Bundle::CPAN File::Spec Digest::MD5 Compress::Zlib Archive::Tar Bundle::libnet and then I got. --- Trying with /usr/bin/lynx -source to get ftp://ftp.digital.com/pub/plan/perl/CPAN/authors/id/G/GB/GBARR/Bundle-libnet-1.00.tar.gz Trying with /usr/bin/lynx -source to get ftp://ftp.digital.com/pub/plan/perl/CPAN/authors/id/G/GB/GBARR/CHECKSUMS Checksum for /root/.cpan/sources/authors/id/G/GB/GBARR/Bundle-libnet-1.00.tar.gz ok Bundle-libnet-1.00/ Bundle-libnet-1.00/Makefile.PL Bundle-libnet-1.00/libnet.pm Bundle-libnet-1.00/README Bundle-libnet-1.00/MANIFEST Running make for G/GS/GSAR/perl-5.6.1.tar.gz Trying with /usr/bin/lynx -source to get ftp://ftp.digital.com/pub/plan/perl/CPAN/authors/id/G/GS/GSAR/perl-5.6.1.tar.gz
Finding AuthUserFile name with the request object.
Hi all, I'm trying to add a little bit more security to a running app. In this app, I'd like to be able to confirm what physical file was used in the 'AuthUserFile /path/to/pass.db' statement. This file choice needs to be dynamic, so I can't simply hard wire this info. Thoughts? Rodney Broom
Re: Regarding modperl installation (fwd)
G.W. Haywood [EMAIL PROTECTED] wrote: There have been a few problems reported with 5.6 and I have seen one or two myself. Although the problems which I saw were largely the result of slightly dubious coding practices and were easily fixed, some people had more serious problems and it's why I moved to 5.7 for development. Dunno if it counts as a dubious coding practice, but I've come across precisely one problem porting the (large) Perl/mod_perl system I maintain at Motorola from 5.005_03 to 5.6.1: sub foo(@); foo {} qw(BAR BAZ); no longer works (from 5.6.0, actually), presumably because qw() actually generates a list at compile time, rather than translating to split, and the equivalent construct foo {} ('BAR', 'BAZ'); doesn't compile in 5.005_03 either. I was slightly doubtful about 5.6.0 as a major release, but I would regard 5.6.1 as safe for production use as long as you treat some of the new bleeding edge features with sensible caution. Pete
Re: Regarding modperl installation (fwd)
From: Stas Bekman [EMAIL PROTECTED] Sent: Friday, May 04, 2001 10:58 PM Of course some people run the bleeding edge versions on their servers (either because they need some new features, unavailable in the stable versions, or just because...). But these people usually don't complain on the list, they send patches if they find something broken. Or just because some ports (e.g. win32) tend to always improve (number of broken features number of fixed features :-) Bill
Apache::DBI problem
Here are my files: httpd.conf - Alias /perl/ /usr/local/www/perl/ PerlModule Apache::DBI PerlRequire /usr/local/www/startup.pl PerlModule Apache::Registry PerlModule Apache::DBI PerlSetEnv PERLDB_OPTS NonStop=1 LineInfo=/tmp/db.out AutoTrace=1 frame=2 PerlModule Apache::DB Location /perl PerlFixupHandler Apache::DB SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI AllowOverride None Order allow,deny Allow from all PerlSendHeader on /Location startup.pl - use strict; $ENV{MOD_PERL} or die not running under mod_perl!; use Apache::DBI (); use Apache; use Apache::Cookie; use Apache::Request; use Carp(); $SIG{__WARN__} = \Carp::cluck; sub My::ProxyRemoteAddr ($) { my $r = shift; return unless ($r-connection-remote_ip eq 127.0.0.1); if (my ($ip) = $r-header_in('X-Forwarded-For') =~ /([^,\s]+)$/) { $r-connection-remote_ip($ip); } return ; } Apache::DBI-connect_on_init (dbi:Pg:dbname=jewelry,'','', { PrintError = 1, RaiseError = 0, AutoCommit = 1, }); my programm - use strict; use Apache::DBI; $Apache::DBI::DEBUG = 2; use Apache; use Carp(); local $SIG{__WARN__} = \$Carp::cluck; my $dbh; $dbh = DBI-connect(dbi:Pg:dbname=jewelry, '', ''); my $r=shift; $r-send_http_header('text/html'); my $sql = select * from tbl_category; my $sth = $dbh-prepare($sql); my $rs = $sth-execute(); my @rs; while(@rs = $sth-fetchrow_array){ $r-print($rs[0]\t$rs[1]\n); } $sth-finish; $dbh-disconnect; and httpd-error.log - [Sat May 5 16:35:28 2001] [notice] FastCGI: process manager initialized (pid 14154) [Sat May 5 16:35:29 2001] [notice] Apache/1.3.19 (Unix) mod_fastcgi/2.2.10 mod_perl/1.25 configured -- resuming normal operations Default die handler restored. 14156 Apache::DBI need ping: yes 14156 Apache::DBI new connect to 'dbname=jewelryPrintError=1AutoCommit=1' [Sat May 5 16:39:27 2001] [error] Not a subroutine reference at (eval 225)[/usr/local/lib/perl5/site_perl/5.6.1/i386-freebsd/Apache/Registry.pm:177] line 73. Line 73 is my $rs = $sth-execute(); So, does anybody understand what's going on? Why my programm doesn't work? It works as plain perl script perfect. And Apache::Session::Store::Postgres works perfect - it mean, mod_perl works with Postgres. Thank's, my best regards, - Grigoriy G. Vovk
Re: Throwing die in Apache::Registry
[EMAIL PROTECTED] (Matt Sergeant) wrote: On Fri, 4 May 2001, Perrin Harkins wrote: on 5/4/01 9:28 AM, Mark Maunder at [EMAIL PROTECTED] wrote: I have an Apache::Registry script that is using XML::Parser. The parser throws a 'die' call if it encounters a parse error (Why?). Because it's an exception and the parser can't continue. I was handling this by putting the code in an eval block, but this no longer works since all Registry scripts are already in one huge eval block. It should still work. An eval{} is scoped like any other block. Maybe you have a typo? Post your code and we'll look at it. More likely is a b0rked $SIG{__DIE__} handler, like fatalsToBrowser. Yick. If he's throwing a die, the randomness is probably going to make it hard to track down the problem. But there should be a 1 in 6 chance of failure, so at least you can figure out the various distributions. [Sorry, I'm teaching a probability class right now.] ------ Ken Williams Last Bastion of Euclidity [EMAIL PROTECTED]The Math Forum