You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Geoffrey Young <gy...@laserlink.net> on 2000/12/27 16:26:28 UTC
[ANNOUNCE] Apache::RequestNotes 0.06
The URL
http://morpheus.laserlink.net/~gyoung/modules/Apache-RequestNotes-0.06.tar.g
z
has entered CPAN as
file: $CPAN/authors/id/G/GE/GEOFF/Apache-RequestNotes-0.06.tar.gz
size: 4800 bytes
md5: 809cb54e2b9b8143a9809753c8f23dc3
well, now that libapreq-0.31_03 is out, with Apache::Request->instance(),
Apache::RequestNotes is little more than a convienent data parser.
Nevertheless, I updated the docs to let folks know about the new libapreq
functionality and changed the instantiation call to use instance() so that
in case anyone still uses Apache::RequestNotes they can use Apache::Request
in other handlers without getting clobbered in the process...
Changes:
0.06 12.27.2000
- changed Apache::Request->new() call to instance()
- documented availability of Apache::Request->instance()
- initialized Apache::RequestNotes::err properly
- minor pod changes
Re: PerlRun problem: can't find method "uri"
Posted by Jie Gao <J....@isu.usyd.edu.au>.
On Tue, 2 Jan 2001, Ken Williams wrote:
> >Error:
> >
> >[Tue Jan 2 16:02:37 2001] [error] Can't locate object method "uri" via
> >package "Apache::PerlRun" at
> >/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Apache/PerlRun.pm line 212.
>
> Jie,
>
> Try this patch. Does it solve the problem?
>
> ------------------------------------------------------------
> --- PerlRun.pm Mon Oct 2 01:02:05 2000
> +++ PerlRun-new.pm Tue Jan 2 00:59:15 2001
> @@ -209,7 +209,7 @@
> my $pr = shift;
> if ($@ and substr($@,0,4) ne " at ") {
> $pr->{r}->log_error("PerlRun: `$@'");
> - $@{$pr->uri} = $@;
> + $@{$pr->{r}->uri} = $@;
> $@ = ''; #XXX fix me, if we don't do this Apache::exit() breaks
> return SERVER_ERROR;
> }
> ------------------------------------------------------------
>
>
> I don't quite understand the voodoo of this line and what it's supposed
> to do, so I'm not sure about the validity of this patch. But I think it
> might solve the problem if anything does.
Thanks for the patch. I put that in and I haven't seen the error again
yet.
Another problem with PerlRun is that it seems to interfere with mod_perl
handlers.
I have an authentication/authorisation handler, which reads in from a
file for someinformation. After a script under PerlRun is run, the handler
fails to read anything from that file anymore.
I have the following in the handler:
# Get the db server login info.
if (defined $dsf) {
open(DBCONF, "$dsf") || $r->log_error("Can't open DSF file $dsf:$!");
while(<DBCONF>){
next if /^#/;
next unless /^$ds_name:/;
print STDERR;
chomp;
($ds_name, $db_f_name, $db_user_name, $db_user_pwd) = split(':', $_);
last;
}
close DBCONF;
} else {
$r->log_reason("DB source file not defined.") if ($debug > 3);
return SERVER_ERROR;
}
unless (defined $db_f_name && defined $db_user_name && defined $db_user_pwd) {
$r->log_reason("DB source file error: definition incomplete: db_f_name=\"$db_f_name\"; db_user_name=\"$db_user_name\"; db_user_pwd=\"$db_user_pwd\".") if ($debug > 3);
return SERVER_ERROR;
}
After the PerlRun script is run, i.e, the sencond time I run the
PerlRun script, all these variables I get from the file become
undefined, and I get the server error.
This won't happen if I turn PerlRun off.
Any solution to this?
Thanks,
Jie
Re: PerlRun problem: can't find method "uri"
Posted by Ken Williams <ke...@forum.swarthmore.edu>.
J.Gao@isu.usyd.edu.au (Jie Gao) wrote:
>Using mod_perl-1.24_01.
>
>Error:
>
>[Tue Jan 2 16:02:37 2001] [error] Can't locate object method "uri" via
>package "Apache::PerlRun" at
>/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Apache/PerlRun.pm line 212.
Jie,
Try this patch. Does it solve the problem?
------------------------------------------------------------
--- PerlRun.pm Mon Oct 2 01:02:05 2000
+++ PerlRun-new.pm Tue Jan 2 00:59:15 2001
@@ -209,7 +209,7 @@
my $pr = shift;
if ($@ and substr($@,0,4) ne " at ") {
$pr->{r}->log_error("PerlRun: `$@'");
- $@{$pr->uri} = $@;
+ $@{$pr->{r}->uri} = $@;
$@ = ''; #XXX fix me, if we don't do this Apache::exit() breaks
return SERVER_ERROR;
}
------------------------------------------------------------
I don't quite understand the voodoo of this line and what it's supposed
to do, so I'm not sure about the validity of this patch. But I think it
might solve the problem if anything does.
------------------- -------------------
Ken Williams Last Bastion of Euclidity
ken@forum.swarthmore.edu The Math Forum
PerlRun problem: can't find method "uri"
Posted by Jie Gao <J....@isu.usyd.edu.au>.
Hi All,
> perl -V
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
Platform:
osname=solaris, osvers=2.7, archname=sun4-solaris
uname='sunos groucho 5.7 generic_106541-12 sun4u sparc sunw,ultra-80 '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='gcc -B/usr/ccs/bin/', optimize='-O2', gccversion=2.95.2 19991024 (release)
cppflags='-I/usr/local/include'
ccflags ='-I/usr/local/include'
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
alignbytes=8, usemymalloc=n, prototype=define
Linker and Libraries:
ld='gcc -B/usr/ccs/bin/', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'
Characteristics of this binary (from libperl):
Built under solaris
Compiled at Jan 2 2001 10:03:49
@INC:
/usr/local/lib/perl5/5.00503/sun4-solaris
/usr/local/lib/perl5/5.00503
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris
/usr/local/lib/perl5/site_perl/5.005
Using mod_perl-1.24_01.
Error:
[Tue Jan 2 16:02:37 2001] [error] Can't locate object method "uri" via package "Apache::PerlRun" at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Apache/PerlRun.pm line 212.
Any idea?
Thanks,
Jie