Will Fould wrote:
> Thank Philip -- That helps! But both virtual hosts run their own
> installation of the same scripts (hence, same package names). The
> installation loads it's configuration for those scripts located at
> $myvar (a simple package with variables). Until recently, installations
>
running separate
> servers for each host?
Actually looking at your original question, it looks like it should work as
long as you are calling $r->dir_config('FOO') on each request. Doing it as a
global within the module wont work (you'll just get whatever the first access
give
Will Fould wrote:
> I thought that packages loaded from different locations, (but with the
> same name), would not conflict. Silly me.
This is because even though you've told apache to map a certain URL to a certain
script, there is only 1 running Perl interpreter. And since Perl only allows 1
, Philip M. Gollucci <
[EMAIL PROTECTED]> wrote:>Will Fould wrote:> package mypackage;
> my($myvar)=();> my $r=Apache2::RequestUtil->request;> $myvar=$r->dir_config('BAR');From what I can see, you're only issue is that you've duplicate
>Will Fould wrote:
> package mypackage;
> my($myvar)=();
> my $r=Apache2::RequestUtil->request;
> $myvar=$r->dir_config('BAR');
>From what I can see, you're only issue is that you've duplicated
package mypackage;
make that
package X;
):
package mypackage;
my($myvar)=();
my $r=Apache2::RequestUtil->request;
$myvar=$r->dir_config('BAR');$myvar is "/www/bar/bar_file" ... which is what I'd expect.But when I later run (/www/foo/foo_scripts/test.cgi): package mypackage;
my
est;
$myvar=$r->dir_config('BAR');$myvar is "/www/bar/bar_file" ... which is what I'd expect.But when I later run (/www/foo/foo_scripts/test.cgi): package mypackage;
my($myvar)=();
my $r=Apache2::RequestUtil->request;
$myvar=$r->dir_config(
On Sun, 5 Feb 2006 23:01:25 +0800
Ken Perl <[EMAIL PROTECTED]> wrote:
> sub handler {
> my $r = shift;
> my $s = Apache2::ServerUtil->server;
>
> $s->dir_config('WRoot');
> $r->dir_config('WConfig');
> }
sub handler {
my $r = shift;
my $s = Apache2::ServerUtil->server;
$s->dir_config('WRoot');
$r->dir_config('WConfig');
}
which module api doc that I could find description about the two
dir_config? I want to know more info about them
On Tue, 20 Dec 2005 06:43:57 -0800 (PST)
jing han <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I meet a problem of "Can't locate object method
> 'dir_config' via package 'Apache2::SOAP'".
>
> I installed httpd-2.0.54-10.i386.rpm and
>
Hello,
I meet a problem of "Can't locate object method
'dir_config' via package 'Apache2::SOAP'".
I installed httpd-2.0.54-10.i386.rpm and
mod_perl-2.0.0-0.rc5.3.i386.rpm with Fedora Core 4
CDs. And then I downloaded and installed
Apache-test-1.26.tar.gz and
Christopher H. Laco wrote:
> While I'm at it...what's the Apache2:: equivilent of SCRIPT_NAME?
$r->uri
See: http://perl.apache.org/docs/2.0/api/Apache2/RequestRec.html#C_uri_
In the future, try to post new questions as a separate email, not as a reply
to an existing thread. Makes it harder to id
While I'm at it...what's the Apache2:: equivilent of SCRIPT_NAME?
-=Chris
smime.p7s
Description: S/MIME Cryptographic Signature
On Fri, 2 Sep 2005, Christopher H. Laco wrote:
Philip M. Gollucci wrote:
Christopher H. Laco wrote:
Can't locate object method "dir_config" via package "Apache2::RequestRec"
Thats a good question. Your code looks fundamentally correct. Here's a
live exampl
Christopher H. Laco wrote:
At this point, $r is a simple old RequestRec. IT appears I have to use
other mofules to enhance what $r can do.
My problem was that I wasn't including RequestIO for print or
RequestUtil for dir_config.
Me thinks you want to put stuff in your startup.pl file
Philip M. Gollucci wrote:
Christopher H. Laco wrote:
Can't locate object method "dir_config" via package
"Apache2::RequestRec"
Thats a good question. Your code looks fundamentally correct. Here's a
live example maybe it will help.
Here's what I
Christopher H. Laco wrote:
Can't locate object method "dir_config" via package "Apache2::RequestRec"
Thats a good question. Your code looks fundamentally correct. Here's a live
example maybe it will help.
http://p6m7g8.net/dir_config
SetHandler modper
I'm trying to get at PerlSetVar configurations, and this doesn't work
under MP2:
sub handler {
my $r = shift;
$r->print( $r->dir_config('MyConfig') );
return Apache2::Const::OK;
};
I'm getting this in the logs:
Can't locate object meth
> more:
> http://perl.apache.org/docs/2.0/api/Apache2/RequestUtil.html#C_dir_config_
> and then ca 7 lines down.
>
> also same page after synopsis ca 14 lines down.
fixed, thanks.
--Geoff
Geoffrey Young skrev:
>
>> http://perl.apache.org/docs/2.0/api/Apache2/RequestUtil.html#C_dir_config_
>> and then ca 33 lines down.
>
> ok, thanks.
>
>>
>> also
>> http://perl.apache.org/docs/2.0/user/config/config.html#C_PerlAddVar_
>> http://perl.apache.org/docs/2.0/user/config/config.html#C_Per
> http://perl.apache.org/docs/2.0/api/Apache2/RequestUtil.html#C_dir_config_
> and then ca 33 lines down.
ok, thanks.
>
> also
> http://perl.apache.org/docs/2.0/user/config/config.html#C_PerlAddVar_
> http://perl.apache.org/docs/2.0/user/config/config.html#C_PerlSetVar_
> has only "META: to be
Geoffrey Young skrev:
>
>>>>Apache2::RequestUtil->dir_config does not seem to work as stated in list
>>>>context.
>>>>PerlAddVar foo one two three
>>>>@values = $r->dir_config($key); # only gives one value
>
> ugh, sorry I didn&
>>>Apache2::RequestUtil->dir_config does not seem to work as stated in list
>>>context.
>>>PerlAddVar foo one two three
>>>@values = $r->dir_config($key); # only gives one value
ugh, sorry I didn't see this the first time.
the syntax is
@val
Geoffrey Young skrev:
>
>
> Bengt-Arne Fjellner wrote:
>> -8<-- Start Bug Report 8<--
>> 1. Problem Description:
>> Apache2::RequestUtil->dir_config does not seem to work as stated in list
>> context.
>&
Bengt-Arne Fjellner wrote:
> -8<-- Start Bug Report 8<--
> 1. Problem Description:
> Apache2::RequestUtil->dir_config does not seem to work as stated in list
> context.
> PerlAddVar foo one two three
> @values = $r->dir_c
-8<-- Start Bug Report 8<--
1. Problem Description:
Apache2::RequestUtil->dir_config does not seem to work as stated in list
context.
PerlAddVar foo one two three
@values = $r->dir_config($key); # only gives one value
this script used as nor
On Tuesday 07 June 2005 18:47, John Ferrell wrote:
> Can't locate object method "dir_config" via package "Apache2::RequestRec"
> at /usr/local/apache2/mod_perl/Auth/GateKeeper.pm line 16.\n
use Apache2::RequestUtil ();
and it should work.
Torsten
pgpsmwvfv1yLi.pgp
Description: PGP signature
John Ferrell wrote:
> I am new to mod_perl. I am trying to test the PerlAccessHandler using the
> Apache::GateKeeper package. However I am having trouble with the
> dir_config() method. When I access the URL I get an error 500 and the
> apache log shows:
>
> Can'
I am new to mod_perl. I am trying to test the PerlAccessHandler using the
Apache::GateKeeper package. However I am having trouble with the
dir_config() method. When I access the URL I get an error 500 and the
apache log shows:
Can't locate object method "dir_config" via p
> Date: Tue, 26 Apr 2005 22:05:08 -0400
> From: Stas Bekman <[EMAIL PROTECTED]>
>
> hmm, I guess there still some people using mp1. This is so
> unfashionable. Everybody wears RC5 these days :)
:-)
I did initially try to use mod_perl2 and Apache2, but I couldn't get
the HTML::Mason module to wo
Mike Taylor wrote:
I wonder if anyone has any light to shed on this peculiar problem?
hmm, I guess there still some people using mp1. This is so unfashionable.
Everybody wears RC5 these days :)
Last night I rebooted a server that's been running happily for several
months, changing nothing. When
er to seggy-fault with no information in the logs.
Through careful detective work, I traced the problem to an invocation
of $s->dir_config(), where $s is the result of Apache->server().
Although I first ran into this in the context of HTML::Mason, much
simpler test programs also show the s
Geoffrey Young wrote:
>
> Scott Fagg wrote:
>
>>I have lines like this in my .htaccess file :
>>
>>AuthName AD
>>AuthType Arup::AuthCkLDAP
>>
>>PerlSetVar ADPath /
>>PerlSetVar ADLoginScript /login.perl
>>
>>.. and i'm using AuthCookie.pm. It picks up on the 'AD' value for
>>AuthName, but cann
Scott Fagg wrote:
> I have lines like this in my .htaccess file :
>
> AuthName AD
> AuthType Arup::AuthCkLDAP
>
> PerlSetVar ADPath /
> PerlSetVar ADLoginScript /login.perl
>
> .. and i'm using AuthCookie.pm. It picks up on the 'AD' value for
> AuthName, but cannot see the PerlSetVar values.
I have lines like this in my .htaccess file :
AuthName AD
AuthType Arup::AuthCkLDAP
PerlSetVar ADPath /
PerlSetVar ADLoginScript /login.perl
.. and i'm using AuthCookie.pm. It picks up on the 'AD' value for
AuthName, but cannot see the PerlSetVar values. e.g i get this in my
error logs :
[erro
Apache::Reload
> PerlSetVar ReloadDebug On
>
> After startup in errors_log appears:
>
> Can't locate object method "dir_config" via package
> "Apache::RequestRec" at /usr/lib/perl5/5.8.1/Apache/Reload.pm
> line 51.
dir_config()
ethod "dir_config" via package
"Apache::RequestRec" at /usr/lib/perl5/5.8.1/Apache/Reload.pm
line 51.
Here is the content of @INC:
/usr/lib/perl5/5.8.1/i386-linux-thread-multi
/usr/lib/perl5/5.8.1
/usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-mul
ocate object method "dir_config" via package
"Apache::RequestRec" at /usr/lib/perl5/5.8.1/Apache/Reload.pm
line 51.
My @INC contains:
/usr/lib/perl5/5.8.1/i386-linux-thread-multi
/usr/lib/perl5/5.8.1
/usr/lib/perl5/site_perl/5.8.
On Tue, 9 Mar 2004, Geoffrey Young wrote:
> ok, the attached patch fixes the problem. it turns out that XS as simple as
> this
>
> RETVAL = Nullsv;
>
> if (!SvOK(RETVAL)) {
> XSRETURN_UNDEF;
> }
>
> dumps core all on its own (without mod_perl's help :)
>
> will be fixed in the n
Geoffrey Young wrote:
-if (!SvTRUE(RETVAL)) {
+if (!SvOK(RETVAL)) {
ok, the attached patch fixes the problem. it turns out that XS as simple as
this
RETVAL = Nullsv;
if (!SvOK(RETVAL)) {
XSRETURN_UNDEF;
}
dumps core all on its own (without mod_perl's help :)
cent of version of Mason should do, though I have 1.25 (well, really
> 1.26-to-be) installed here.
my hacking is limited this week, but I'll try to install mason and reproduce
tomorrow. in the meanwhile, please try this (untested) patch, just in case
there's magic lying around (
) as well.
> > The trigger seems to be the fact that Mason includes this bit of code
> > which _may_ be called at server startup:
> >
> > my $c = $r ? $r : Apache->server;
> > @val = HAS_TABLE_API ? $c->dir_config->get($p) : $c->d
t that Mason includes this bit of code
> which _may_ be called at server startup:
>
> my $c = $r ? $r : Apache->server;
> @val = HAS_TABLE_API ? $c->dir_config->get($p) : $c->dir_config($p);
does it matter which form you use if PERL_TABLE_API is enabled
val = HAS_TABLE_API ? $c->dir_config->get($p) : $c->dir_config($p);
The change in question is this one:
===
RCS file: /home/cvspublic/modperl/src/modules/perl/Apache.xs,v
retrieving revision 1.129
retrieving revision 1.130
dif
44 matches
Mail list logo