Re: PerlSetVar inside doesn't seem to work

2015-07-15 Thread John Dunlap
Glad I could help! On Wed, Jul 15, 2015 at 8:19 PM, Jim Garrison wrote: > On 7/15/2015 5:07 PM, Jim Garrison wrote: > > I have the following config > > > > > [snip] > > > > However it's getting empty strings for the values. This was working > >

Re: PerlSetVar inside doesn't seem to work

2015-07-15 Thread Jim Garrison
On 7/15/2015 5:07 PM, Jim Garrison wrote: > I have the following config > > [snip] > > However it's getting empty strings for the values. This was working > when the PerlSetVar directives were outside the VirtualHost block. It seems when you access dir_config through

Re: PerlSetVar inside doesn't seem to work

2015-07-15 Thread John Dunlap
I'm also using a virtual host, though I place my PerlSetVar without a . This is the code that I use to extract them: foreach my $apache_key (CORE::keys %{$apache->dir_config}) { $literals{$apache_key} = $apache->dir_config->{$apache_key}; } In this example, $apache

Re: PerlSetVar inside doesn't seem to work

2015-07-15 Thread John Dunlap
*within a On Wed, Jul 15, 2015 at 8:12 PM, John Dunlap wrote: > I'm also using a virtual host, though I place my PerlSetVar without a > . This is the code that I use to extract them: > > foreach my $apache_key (CORE::keys %{$apache->dir_config}) { > $literals

PerlSetVar inside doesn't seem to work

2015-07-15 Thread Jim Garrison
PerlInitHandler Apache2::Reload > > PerlSetVar app_dir /var/webapp > PerlSetVar template_dir /templates > PerlSetVar albums_dir /albums > PerlSetVar static_url /static > PerlSetVar

Re: PerlSetVar behaviour within directive

2009-01-23 Thread Michael Ludwig
Pat Downey schrieb: I guess I might have to modify the module to recognise another couple of variables say CrowdAllowedWriteGroups and CrowdAllowedReadGroups and not worry about the directives as I think I'm using them in a way that wasn't intended. That's what I think, too. The relevant conc

Re: PerlSetVar behaviour within directive

2009-01-23 Thread Pat Downey
2009/1/23 Torsten Foertsch > PerlSetVar CrowdAllowedGroups reader,writer > Require valid-user > > PerlSetVar CrowdAllowedGroups writer > > Thanks for the response Torsten, unfortunately this still exhibits the same behaviour that I was experiencing before. In bot

Re: PerlSetVar behaviour within directive

2009-01-23 Thread Torsten Foertsch
On Fri 23 Jan 2009, Pat Downey wrote: >   >     PerlSetVar CrowdAllowedGroups reader,writer >     Require valid-user >   >   >     PerlSetVar CrowdAllowedGroups writer >     Require valid-user >   > > > What I'd like is for members of the reader or write

PerlSetVar behaviour within directive

2009-01-23 Thread Pat Downey
ler Apache::CrowdAuth PerlAuthzHandler Apache::CrowdAuthz PerlSetVar CrowdAppName app PerlSetVar CrowdAppPassword *** PerlSetVar CrowdSOAPURL http://crowdhost:8095/crowd/services/SecurityServer PerlSetVar CrowdAllowedGroups reader,writer Require valid-user

Re: PerlSetVar to empty

2008-10-14 Thread Perrin Harkins
On Tue, Oct 14, 2008 at 10:03 AM, André Warnier <[EMAIL PROTECTED]> wrote: > , but in a a specific , I would like to reset this to > > PerlSetVar myvar "" I've never done this, but did you try undef? Or maybe 0, if you just want to test for true. - Perrin

PerlSetVar to empty

2008-10-14 Thread André Warnier
Hi. Ref : Apache/2.2.3 (Debian) DAV/2 SVN/1.4.2 mod_jk/1.2.18 PHP/4.4.4-8+etch4 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations This is a really silly question. I have a configuration where at the global server level, I set PerlSetVar myvar

Re: Reading PerlSetVar in mod_perl2

2006-10-25 Thread Perrin Harkins
[EMAIL PROTECTED] wrote: This does not differentiate the behaviour from apache 1.3 If you're looking for a big announcement saying that the behavior was changed, I don't think you'll find one. It might have been unintended. It might have been a bug in apache 1.3. It's an httpd issue, so if

RE: Reading PerlSetVar in mod_perl2

2006-10-25 Thread khan.sajid
Thanks again for the reply > 1.This was not happening in apache 1.3, Is there any apache 2 > documentation which mentions this behaviour >>http://httpd.apache.org/docs/2.0/sections.html >>"Later sections override earlier ones." This does not differentiate the behaviour from apac

Re: Reading PerlSetVar in mod_perl2

2006-10-24 Thread Perrin Harkins
On Tue, 2006-10-24 at 22:43 +0530, sajid khan wrote: > 1.This was not happening in apache 1.3, Is there any apache 2 > documentation which mentions this behaviour http://httpd.apache.org/docs/2.0/sections.html "Later sections override earlier ones." > 2.Does the Location

Re: Reading PerlSetVar in mod_perl2

2006-10-24 Thread sajid khan
apache encounters another Location directive for same mapping in httpd.conf?   Thanks,     On 10/23/06, Philip M. Gollucci < [EMAIL PROTECTED]> wrote: > / > /SSLRequireSSL> //SetHandler    perl-script// > //PerlSetVar    somevar11> PerlSetVar  

Re: Reading PerlSetVar in mod_perl2

2006-10-23 Thread sajid khan
ucci <[EMAIL PROTECTED]> wrote: > /> /SSLRequireSSL> //SetHandler    perl-script// > //PerlSetVar    somevar11> PerlSetVarsomevar2   2> PerlHandler   Apache::Hello//> //> //> and then below that> > > PerlAccessH

RE: Reading PerlSetVar in mod_perl2

2006-10-23 Thread khan.sajid
(WT01 - Computing Systems & Storage); modperl@perl.apache.org Subject: Re: Reading PerlSetVar in mod_perl2 > / > /SSLRequireSSL > //SetHandlerperl-script// > //PerlSetVar somevar11 > PerlSetVarsomevar2 2 > PerlHan

Re: Reading PerlSetVar in mod_perl2

2006-10-23 Thread Philip M. Gollucci
/ /SSLRequireSSL //SetHandlerperl-script// //PerlSetVarsomevar11 PerlSetVarsomevar2 2 PerlHandler Apache::Hello// // // and then below that PerlAccessHandler Apache::Hello1 You want this: SSLRequireSSL SetHandler

Re: Reading PerlSetVar in mod_perl2

2006-10-21 Thread sajid khan
ion block for same mapping as below SSLRequireSSL SetHandler    perl-script PerlSetVar    somevar1    1 PerlSetVar    somevar2   2 PerlHandler   Apache::Hello and then below that PerlAccessHandler   Apache::Hello1 If I combine both the location, I mean add the PerlAc

RE: Reading PerlSetVar in mod_perl2

2006-10-19 Thread Perrin Harkins
On Thu, 2006-10-19 at 13:22 +0530, [EMAIL PROTECTED] wrote: > Thanks Perrin for the reply, > >Most likely you are not actually in the Location block that you think > you're in > I am on the same Location block What does $r->location() tell you? Make sure you are loading Apache2::RequestUtil. >

RE: Reading PerlSetVar in mod_perl2

2006-10-19 Thread khan.sajid
dler but not with much help Thanks Sajid -Original Message- From: Perrin Harkins [mailto:[EMAIL PROTECTED] Sent: Thursday, October 19, 2006 1:11 AM To: Sajid Khan (WT01 - Computing Systems & Storage) Cc: modperl@perl.apache.org Subject: Re: Reading PerlSetVar in mod_perl2 On

Re: Reading PerlSetVar in mod_perl2

2006-10-18 Thread Perrin Harkins
On Wed, 2006-10-18 at 15:30 +0530, [EMAIL PROTECTED] wrote: > > SSLRequireSSL > SetHandlerperl-script > PerlHandler Apache::Hello > PerlSetVarsomevar1 1 > PerlSetVar somevar2 2 > PerlSetVar some

Reading PerlSetVar in mod_perl2

2006-10-18 Thread khan.sajid
Hi All,   I asked the same question before but with not much help so I am asking it again, The below configuration is added to a configuration file and that is included in httpd.conf     SSLRequireSSL  SetHandler    perl-script  PerlHandler   Apache::Hello  PerlSetVar

Re: mod_perl apache filter perlsetvar not working??

2006-09-25 Thread Philip M. Gollucci
advertising > banner , and information whether the site should have banner or not is > written from mysql to htaccess file in the web site directory. Now the > problem is that mod_perl filter does not see any variables that i set in > htaccess. For exemple I set "PerlSetEnv Banner

mod_perl apache filter perlsetvar not working??

2006-09-25 Thread Oleg R.
information whether the site should have banner or not is written from mysql to htaccess file in the web site directory. Now the problem is that mod_perl filter does not see any variables that i set in htaccess. For exemple I set "PerlSetEnv Banner 1" or "PerlSetVar Banner 1" and

Re: PerlSetVar

2006-08-03 Thread Perrin Harkins
On Thu, 2006-08-03 at 08:47 +0300, Vladimir S. Tikhonjuk wrote: > Well, now I'll try to explain why I have asked such question. I have > startup.pl with connect_on_init dunction. > Also, I want to use Apache::AuthDBI. And I want options for > Apache::DBI->connect(...) to be stored into httpd.co

Re: PerlSetVar

2006-08-03 Thread Jonathan Vanasco
Well, now I'll try to explain why I have asked such question. I have startup.pl with connect_on_init dunction. Also, I want to use Apache::AuthDBI. And I want options for Apache::DBI->connect(...) to be stored into httpd.conf or another but the only place. I think that I could declare

Re: PerlSetVar

2006-08-02 Thread Vladimir S. Tikhonjuk
Philip M. Gollucci пишет: >Vladimir S. Tikhonjuk wrote: > > >>Philip M. Gollucci пишет: >> >> >> >>>Vladimir S. Tikhonjuk wrote: >>> >>> >>> >>> >>>>I set in httpd.conf

Re: PerlSetVar

2006-08-02 Thread Philip M. Gollucci
Vladimir S. Tikhonjuk wrote: > Philip M. Gollucci пишет: > >> Vladimir S. Tikhonjuk wrote: >> >> >>> I set in httpd.conf variable like: PerlSetVar var test; >>> >>> How can I get it in the startup.pl script ? >>> &g

Re: PerlSetVar

2006-08-02 Thread Jonathan Vanasco
On Aug 2, 2006, at 7:18 AM, Vladimir S. Tikhonjuk wrote: Well, nice advise, but where can I get $r ( Apache2::RequestRec ) variable in startup.pl script ? In handler script - everything is O.K. But startup.pl! You can't. Apache2::RequestRec is a per-request variable. startup.pl/httpd.conf ar

Re: PerlSetVar

2006-08-02 Thread Vladimir S. Tikhonjuk
Philip M. Gollucci пишет: >Vladimir S. Tikhonjuk wrote: > > >>I set in httpd.conf variable like: PerlSetVar var test; >> >>How can I get it in the startup.pl script ? >> >> >http://perl.apache.org/docs/2.0/user/config/config.html#C_PerlSetVar_

Re: PerlSetVar

2006-08-02 Thread Philip M. Gollucci
Vladimir S. Tikhonjuk wrote: > I set in httpd.conf variable like: PerlSetVar var test; > > How can I get it in the startup.pl script ? http://perl.apache.org/docs/2.0/user/config/config.html#C_PerlSetVar_ You might want to read and re-read and re-read and re-read The 2.0 Us

PerlSetVar

2006-08-02 Thread Vladimir S. Tikhonjuk
Hi all! I set in httpd.conf variable like: PerlSetVar var test; How can I get it in the startup.pl script ? Vladimir.

Re: Using PerlSetVar in virtual environments

2006-06-02 Thread Perrin Harkins
hat file on every request, change require to "do" instead. A better way is to load all the data into a hash and then use something from the PerlSetVar as an index to tell which data in the hash to use for this request. That avoids reloading the file over and over. - Perrin

Using PerlSetVar in virtual environments

2006-06-02 Thread Will Fould
Hello -- I'm have a 'contamination' issue using PerlSetVar in a virtual environment. I'm wondering if my trouble is from my use of 'require' or from using non-unique PerlSetVar variable names (although, under separate virtual containers). While we can continue to run

Re: MP2.0.1 - PerlSetVar / PerlAddVar broken for .htaccess

2005-10-12 Thread Randal L. Schwartz
>>>>> "Randal" == Randal L Schwartz writes: >>>>> "Geoffrey" == Geoffrey Young <[EMAIL PROTECTED]> writes: Geoffrey> I'd be surprised if that works. $r->server->dir_config() Geoffrey> ought to give unmerged per-server Per

Re: MP2.0.1 - PerlSetVar / PerlAddVar broken for .htaccess

2005-10-12 Thread Randal L. Schwartz
>>>>> "Geoffrey" == Geoffrey Young <[EMAIL PROTECTED]> writes: Geoffrey> I'd be surprised if that works. $r->server->dir_config() Geoffrey> ought to give unmerged per-server PerlSetVar settings which, Geoffrey> by design, cannot exist in an

Re: MP2.0.1 - PerlSetVar / PerlAddVar broken for .htaccess

2005-10-11 Thread Geoffrey Young
Randal L. Schwartz wrote: > It appears that PerlSetVar and PerlAddVar, while being parsed > and noted for .htaccess, have no effect. > > At least for the half-dozen trials I made. > > I presume I'm reading this right... if I have > > sub handler

MP2.0.1 - PerlSetVar / PerlAddVar broken for .htaccess

2005-10-11 Thread Randal L. Schwartz
It appears that PerlSetVar and PerlAddVar, while being parsed and noted for .htaccess, have no effect. At least for the half-dozen trials I made. I presume I'm reading this right... if I have sub handler { my $r = shift; my @values = $r->server->dir_

Re: mp2: PerlSetVar not working?

2004-09-20 Thread Geoffrey Young
27;, >> 'require' => 'valid-user' >>}; >> > > > yeah, I see it now - it's the same (known) bug somebody was bitten by > earlier this week. > > basically, PerlSetVar and PerlAddVar do not merge properly for overlapping > contai

Re: mp2: PerlSetVar not working?

2004-07-07 Thread Geoffrey Young
x27;valid-user' > }; > yeah, I see it now - it's the same (known) bug somebody was bitten by earlier this week. basically, PerlSetVar and PerlAddVar do not merge properly for overlapping containers. in your situation the is merging with your (or whatever). the same bug holds for me

Re: mp2: PerlSetVar not working?

2004-07-07 Thread Matthew Darwin
ok, it helps if you type 'axps' correctly on "perl Makfile.PL". Oops. Anyway, here is the result of the correct testing: [omit makefile and all that stuff] [EMAIL PROTECTED]:~/perlsetvar-bug-mp2# /kinnetics/component/httpd/bin/httpd -d /data1/system/root/perlsetvar-bug-mp2

Re: mp2: PerlSetVar not working?

2004-07-07 Thread Geoffrey Young
> [ error] configure() has failed: > find_apache_module: module name argument is required at > /kinnetics/component/httpd/site_perl/i386-linux-thread-multi/Apache/TestConfig.pm > line 702. hmm, this is strange - unrelated to the PerlSetVar issue, but an issue with Apache-Test for

Re: mp2: PerlSetVar not working?

2004-07-06 Thread Matthew Darwin
a separate server and tar everything up and bring it over here to test on. [EMAIL PROTECTED]:~# rm -r perlsetvar-bug-mp2 [EMAIL PROTECTED]:~# tar -xzf perlsetvar-bug-mp2.tar.gz [EMAIL PROTECTED]:~# cd perlsetvar-bug-mp2 [EMAIL PROTECTED]:~/perlsetvar-bug-mp2# perl Makefile.PL -axps `which apxs` Checki

Re: mp2: PerlSetVar not working?

2004-07-06 Thread Matthew Darwin
Nope. Turned off it is the same. I can upgrade to httpd-2.0.50 if that helps... I already have it compiled. Randy Kobes wrote: On Tue, 6 Jul 2004, Matthew Darwin wrote: The behaviour is consistantly wrong at least... [Tue Jul 06 18:38:36 2004] [notice] Apache/2.0.49 (Unix) mod_perl/1.99_14 Perl/v

Re: mp2: PerlSetVar not working?

2004-07-06 Thread Geoffrey Young
Matthew Darwin wrote: > What is the output of that script supposed to look like? Without doing > anything I have issues: > > [EMAIL PROTECTED]:~# tar -xzf perlsetvar-bug-mp2.tar.gz > [EMAIL PROTECTED]:~# cd perlsetvar-bug-mp2 tsk, tsk - logged in as root. good thing I didn

Re: mp2: PerlSetVar not working?

2004-07-06 Thread Randy Kobes
On Tue, 6 Jul 2004, Matthew Darwin wrote: > The behaviour is consistantly wrong at least... > > [Tue Jul 06 18:38:36 2004] [notice] Apache/2.0.49 (Unix) > mod_perl/1.99_14 Perl/v5.8.3 DAV/2 configured -- resuming normal > operations [ ... ] Does anything change if you disable DAV/2? -- best rega

Re: mp2: PerlSetVar not working?

2004-07-06 Thread Matthew Darwin
What is the output of that script supposed to look like? Without doing anything I have issues: [EMAIL PROTECTED]:~# tar -xzf perlsetvar-bug-mp2.tar.gz [EMAIL PROTECTED]:~# cd perlsetvar-bug-mp2 [EMAIL PROTECTED]:~/perlsetvar-bug-mp2# perl Makefile.PL Checking if your kit is complete... Looks

Re: mp2: PerlSetVar not working?

2004-07-06 Thread Geoffrey Young
Matthew Darwin wrote: > Ok, > > I removed this section of httpd.conf, I start seeing output from your > script: > > ... ok, that's a start :) there are really too many variables at this point for me to figure out what you are trying to do. if you could adjust t/conf/extra.conf.in in small i

Re: mp2: PerlSetVar not working?

2004-07-06 Thread Matthew Darwin
8:38:42 2004] [warn] [client 10.2.210.1] Value of Foo is: \n I can't reproduce your problem. please try this self-contained tarball with a recent mod_perl (preferably the latest release, 1.99_14): http://perl.apache.org/~geoff/perlsetvar-bug-mp2.tar.gz if the test fails for you, please file

Re: mp2: PerlSetVar not working?

2004-07-06 Thread Geoffrey Young
is self-contained tarball with a recent mod_perl (preferably the latest release, 1.99_14): http://perl.apache.org/~geoff/perlsetvar-bug-mp2.tar.gz if the test fails for you, please file an official bug report as described here: http://perl.apache.org/bugs/ if the test passes but you still are

Re: mp2: PerlSetVar not working?

2004-07-06 Thread Matthew Darwin
x27;m trying to pass a value from httpd.conf to the module I know this used to work in mp1, but I can't seem to get it to work in mp2 Ideas? Thanks. httpd.conf -- PerlModule Apache::Foo SetHandler perl-script PerlResponseHandler Apache::Foo PerlSetVar FooValue FooB

Re: mp2: PerlSetVar not working?

2004-07-06 Thread Randy Kobes
gt; > httpd.conf > -- > > PerlModule Apache::Foo > > SetHandler perl-script > PerlResponseHandler Apache::Foo > PerlSetVar FooValue FooBarBaz > > > > Apache/Foo.pm > - > > package Apache::Foo; > > use Apache::Const -compile =&g

mp2: PerlSetVar not working?

2004-07-05 Thread Matthew Darwin
sponseHandler Apache::Foo PerlSetVar FooValue FooBarBaz Apache/Foo.pm - package Apache::Foo; use Apache::Const -compile => ':common'; use Apache::ServerUtil (); sub handler { my ($r) = @_; warn "Value of Foo is 1: ", $r->server->dir_config ("FooValue

MP2: how to do multiple "PerlSetVar" from with sections?

2004-04-11 Thread Will Trillich
has anyone here been able to do multiple directives (such as three or more "PerlSetVar") via sections, from inside the %VirtualHost{$NameVirtualHost} hash? we haven't been able to figure it out: here are the four ways we figured might work; but each of them generates a "Per

Re: MP2: trouble in PerlSection: how to do multiple "PerlSetVar"?

2004-04-05 Thread Will Trillich
On Mon, Apr 05, 2004 at 11:39:16AM -0400, [EMAIL PROTECTED] wrote: > Try "use Data::Dumper; " to debug it. we do. :( it shows that our structures look the way we expect them to look -- the problem is that they're obviously not the way APACHE expects them to look... see new thread Subject: sectio

Re: MP2: trouble in PerlSection: how to do multiple "PerlSetVar"?

2004-04-05 Thread HLiu
To: [EMAIL PROTECTED] | | cc: | | Subject: Re: MP2: trouble in PerlSection:

Re: MP2: trouble in PerlSection: how to do multiple "PerlSetVar"?

2004-04-05 Thread Will Trillich
On Mon, Apr 05, 2004 at 08:15:40AM -0400, Geoffrey Young wrote: > >>did you try this: > >> > >> push @PerlSetVar, "MasonCompRoot /var/www/$site"; > >> > >>? > > it was the full string that you ought to try: > > push @{$Vir

Re: MP2: trouble in PerlSection: how to do multiple "PerlSetVar"?

2004-04-05 Thread Geoffrey Young
>>did you try this: >> >> push @PerlSetVar, "MasonCompRoot /var/www/$site"; >> >>? >> >>IIRC most of the configurations could accept a simple string in >>mp1, so I would expect things to be pretty much the same in >>mp2. > >

Re: MP2: trouble in PerlSection: how to do multiple "PerlSetVar"?

2004-04-04 Thread Will Trillich
[recap: trying to simulate repeatable directives like this conf snippet, in perl-- ... PerlSetVar MasonCompRoot /var/www/xyz.pdq PerlSetVar MasonDataDir /var/cache/mason/xyz.pdq ... and running into "PerlS

Re: MP2: trouble in PerlSection: how to do multiple "PerlSetVar"?

2004-04-01 Thread Geoffrey Young
> what's the workaround? didn't see anything like this in our > searchings through the mod_perl list archives... did you try this: push @PerlSetVar, "MasonCompRoot /var/www/$site"; ? IIRC most of the configurations could accept a simple string in mp1, so I would

MP2: trouble in PerlSection: how to do multiple "PerlSetVar"?

2004-04-01 Thread Will Trillich
/lurk :) we're having trouble translating a standard httpd.conf setup into a section when there's a directive that can be legally repeated multiple times, such as PerlSetVar -- objective: translate MULTIPLE "PerlSetVar" from straight httpd.conf int

Re: Bad fix for "fix "PerlSetVar Foo 0" so that $r->dir_config('Foo') returns 0, not undef" in dev tree

2004-03-09 Thread Dave Rolsky
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

Re: Bad fix for "fix "PerlSetVar Foo 0" so that $r->dir_config('Foo') returns 0, not undef" in dev tree

2004-03-09 Thread Geoffrey Young
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 :)

Re: Bad fix for "fix "PerlSetVar Foo 0" so that $r->dir_config('Foo') returns 0, not undef" in dev tree

2004-03-08 Thread Geoffrey Young
>>>-if (!SvTRUE(RETVAL)) { >>>+if (!SvOK(RETVAL)) { >> >>I don't see how that could cause a segfault at first glance - it ought to >>only affect "0" cases, so if you don't qualify the results ought to be the >>same... > > > Yeah, you'd think. > > I'm quite sure this is the culprit, thou

Re: Bad fix for "fix "PerlSetVar Foo 0" so that $r->dir_config('Foo') returns 0, not undef" in dev tree

2004-03-08 Thread Dave Rolsky
ir_config($p); > > does it matter which form you use if PERL_TABLE_API is enabled? Yes, if table api isn't enabled then dir_config just returns a hash, right? > what is the status of your config? I'm assuming that $c is an > Apache::Server object and not $r. Do you actually

Re: Bad fix for "fix "PerlSetVar Foo 0" so that $r->dir_config('Foo') returns 0, not undef" in dev tree

2004-03-08 Thread Geoffrey Young
? what is the status of your config? I'm assuming that $c is an Apache::Server object and not $r. Do you actually have a per-server PerlSetVar at all, PerlSetVar foo 0, or PerlSetVar foo bar? > -if (!SvTRUE(RETVAL)) { > +if (!SvOK(RETVAL)) { I don't see how that could cause

Bad fix for "fix "PerlSetVar Foo 0" so that $r->dir_config('Foo') returns 0, not undef" in dev tree

2004-03-08 Thread Dave Rolsky
So this change was incorporated in the latest Debian apache-perl package, and it causes segfaults when used with Mason. 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 = H

Re: VirtualHost + PerlSetVar

2003-12-23 Thread Geoffrey Young
> OK, we have to do it ourselves, which is easy (.e.g with the patch > below). The problem is this: all vhosts inherit PerlPostConfigHandler > from the main server and run it. They all inherit the PerlSetVar as > well. I'm not sure this is the wanted behavior. I suppose thi

Re: VirtualHost + PerlSetVar

2003-12-22 Thread Geoffrey Young
>> That is indeed much simpler. Is the fact that you can get from the >> root server to vhost to vhost documented anywhere? I couldn't find it >> in the docs. > > > I think not. Patches are welcome. it's the same as it was in 1.0, which is documented in Recipe 4.1 in the mod_perl Developer's

Re: VirtualHost + PerlSetVar

2003-12-22 Thread Stas Bekman
I don't think it will work in the general case for Apache::PageKit, because it needs to support different values in different locations, i.e. for this configuration: PerlSetVar PKIT_SERVER xyz PerlSetVar PKIT_ROOT /pk/a PerlSetVar PKIT_ROOT /pk/b PerlSetVar PKIT_ROOT /pk/c PerlSet

Re: VirtualHost + PerlSetVar

2003-12-22 Thread Paul G. Weiss
mented anywhere? I couldn't find it in the docs. But unfortunately I don't think it will work in the general case for Apache::PageKit, because it needs to support different values in different locations, i.e. for this configuration: PerlSetVar PKIT_SERVER xyz PerlSetVa

Re: VirtualHost + PerlSetVar

2003-12-22 Thread Stas Bekman
this: PerlPostConfigHandler PageKitHandler::handle PerlSetVar PKIT_ROOT onevalue PerlSetVar PKIT_SERVER serverone PerlSetVar PKIT_ROOT twovalue PerlSetVar PKIT_SERVER servervalue sub handle { my $tree = Apache::Directive->conftree; my @pkitroots = $tree->lookup('PerlSet

Re: VirtualHost + PerlSetVar

2003-12-21 Thread Paul G. Weiss
::handle PerlSetVar PKIT_ROOT onevalue PerlSetVar PKIT_SERVER serverone PerlSetVar PKIT_ROOT twovalue PerlSetVar PKIT_SERVER servervalue sub handle { my $tree = Apache::Directive->conftree; my @pkitroots = $tree->lookup('PerlSetVar', 'PKIT_ROOT'); foreach my

Re: VirtualHost + PerlSetVar

2003-12-21 Thread Stas Bekman
handlers configured () You are right. I added a test and it fails :( I was pretty sure that it should have worked. OK, we have to do it ourselves, which is easy (.e.g with the patch below). The problem is this: all vhosts inherit PerlPostConfigHandler from the main server and run it. They all in

Re: VirtualHost + PerlSetVar

2003-12-21 Thread Boris Zentner
Hi, Am Samstag, 20. Dezember 2003 22:52 schrieb Paul G. Weiss: > Great suggestion. I'll certainly try that. > > As to why I expected PerlSetVar to be available during startup, it is > because that is how it was with mod_perl1, and I wasn't considering the > fact that c

Re: VirtualHost + PerlSetVar

2003-12-21 Thread Stas Bekman
Paul G. Weiss wrote: Rats! PerlPostConfigHandler appears to have absolutely no effect when placed inside a scope. It does indeed run when placed outside. I know this because I have something like: open(H, ">", "/tmp/output"); print H "something\n" in my handler and the file written to only w

Re: VirtualHost + PerlSetVar

2003-12-20 Thread Paul G. Weiss
-Paul On Sat, 20 Dec 2003 16:52:09 -0500, Paul G. Weiss <[EMAIL PROTECTED]> wrote: Great suggestion. I'll certainly try that. As to why I expected PerlSetVar to be available during startup, it is because that is how it was with mod_perl1, and I wasn't considering th

Re: VirtualHost + PerlSetVar

2003-12-20 Thread Paul G. Weiss
Great suggestion. I'll certainly try that. As to why I expected PerlSetVar to be available during startup, it is because that is how it was with mod_perl1, and I wasn't considering the fact that configuration in mod_perl2 is a very different animal. I'll pass your sugge

Re: VirtualHost + PerlSetVar

2003-12-19 Thread Stas Bekman
Paul G. Weiss wrote: [...] The reason this is important is that I'm trying to get Apache::PageKit to run in virtual hosts, and it depends on the availability of PerlSetVar variables on startup. First of all, why do you expect PerlSetVar to be available at the server startup? The config pha

Re: VirtualHost + PerlSetVar

2003-12-19 Thread Paul G. Weiss
-- PerlRequire /var/www/perl/startup.pl # set value in global scope PerlSetVar foo global SetHandler perl-script PerlHandler Module # set value in virtual host scope PerlSetVar foo virtual Module->start; -- /var/www/perl/startup.pl -- use Apache2 (); use Apache::RequestIO (); use Apache::

VirtualHost + PerlSetVar

2003-12-19 Thread Paul G. Weiss
I have something like this: PerlModule Module PerlSetVar abc def Module->start; and in Module.pm use Apache::ServerUtil () ... sub startup { my $value = Apache->server->dir_config("abc"); ... } and lo and behold - $value is undef ! However, if I take the Perl

Re: PerlSetVar with '0' value

2003-11-26 Thread Stas Bekman
Enrico Sorcinelli wrote: [...] Index: src/modules/perl/Apache.xs [...] -if (!SvTRUE(RETVAL)) { +if (!SvOK(RETVAL)) { [...] Hi Geoff, the patch seems to work fine. I've applied it over mp 1.29 (with Apache 1.3.28) Since this is a bug, fixing it is a right thing to do. If someone was relying

Re: PerlSetVar with '0' value

2003-11-26 Thread Enrico Sorcinelli
On Tue, 25 Nov 2003 15:47:07 -0500 Geoffrey Young <[EMAIL PROTECTED]> wrote: > > I'll > > take a look at 1.0 "soonish" > > it looks like the logic is pretty much the same in 1.0 as well. > > please try this (untested) patch and let me know if it fixes things for you. > > --Geoff > > Index: sr

Re: PerlSetVar with '0' value

2003-11-26 Thread Enrico Sorcinelli
On Tue, 25 Nov 2003 15:34:16 -0500 Geoffrey Young <[EMAIL PROTECTED]> wrote: > Enrico Sorcinelli wrote: > > Hi all, > >> > > I have this PerlSetVar behaviour. Suppose to have: > > > > > > SetHander pe

Re: PerlSetVar with '0' value

2003-11-25 Thread Geoffrey Young
> I'll > take a look at 1.0 "soonish" it looks like the logic is pretty much the same in 1.0 as well. please try this (untested) patch and let me know if it fixes things for you. --Geoff Index: src/modules/perl/Apache.xs === RCS f

Re: PerlSetVar with '0' value

2003-11-25 Thread Geoffrey Young
Enrico Sorcinelli wrote: > Hi all, > > I have this PerlSetVar behaviour. Suppose to have: > > > SetHander perl-script > PerlSetVar Something 0 > PerlResponseHandler MyModule > > > But in MyModule.pm, $r

Re: PerlSetVar with '0' value

2003-11-17 Thread Geoffrey Young
Enrico Sorcinelli wrote: Hi all, I have this PerlSetVar behaviour. Suppose to have: SetHander perl-script PerlSetVar Something 0 PerlResponseHandler MyModule But in MyModule.pm, $r->dir_config('Something') returns a

PerlSetVar with '0' value

2003-11-17 Thread Enrico Sorcinelli
Hi all, I have this PerlSetVar behaviour. Suppose to have: SetHander perl-script PerlSetVar Something 0 PerlResponseHandler MyModule But in MyModule.pm, $r->dir_config('Something') returns an undef value instead of 0