Re: Trouble using dir_config for PerlSetVar inside Perl section

2003-02-18 Thread Geoffrey Young
Larry Leszczynski wrote: Hi all - I'm having trouble using server-dir_config in my startup.pl to read variables set by PerlSetVar inside a Perl section. I'm using Perl 5.6.1, Apache 1.3.27, and mod_perl 1.27. [snip] and this does not work either: Perl push @{$Location

Re: Trouble using dir_config for PerlSetVar inside Perl section

2003-02-18 Thread Larry Leszczynski
instead of a per-server scope, since your config is now in a Perl section. meaning, Apache-server-dir_config is (rightfully) empty because now your configuration is in Apache-request-dir_config. of course, you can't get at $r-dir_config at startup, so you're pretty much SOL. try looking

Perl section run on SIG_HUP

2003-02-17 Thread Derek Watson
Here's something I'm having a tough time digging up in the docs: I've got Apache 1.3.27 with dynamically configured VirtualHosts via mod_perl-1.27. This is working fine, when I first start the server the Perl section runs and everything is fine. I would also like this code to be run

Trouble using dir_config for PerlSetVar inside Perl section

2003-02-17 Thread Larry Leszczynski
Hi all - I'm having trouble using server-dir_config in my startup.pl to read variables set by PerlSetVar inside a Perl section. I'm using Perl 5.6.1, Apache 1.3.27, and mod_perl 1.27. In startup.pl I have: my $file = Apache-server-dir_config(CFG) || ; warn Missing path to config file

Trouble with perl section in .htaccess

2003-02-16 Thread Mustafa Arif
Hi, I am using the following in my .htaccess file: Perl my $r = Apache-request(); $RewriteBase = $r-uri(); /Perl The reason for doing this is that Apache mod_rewrite requests RewriteBase to be set to the logical path of the directory. (This code snippet is just a test... I

Perl Section will not run on HUP/Restart

2003-02-13 Thread Derek Watson
Here's something I'm having a tough time digging up in the docs: I've got Apache 1.3.27 with dynamically configured VirtualHosts via mod_perl-1.27. This is working fine, when I first start the server the Perl section runs and everything is fine. I would also like this code to be run

Can't get nested files to work in Perl section

2002-12-19 Thread Bill Moseley
mod_perl 1.27 / httpd 1.3.27 In the perl httpd.conf below test.cgi is returned as the default type, text/plain, where test2.cgi is run as a CGI script. Do I have this setup incorrectly? In a standard httpd.conf file it's allowable to have files nested within directory, of course. Perl #!perl

perl section does not override conf default

2002-09-30 Thread [EMAIL PROTECTED]
in the conf I have a perl section redefining the above : [...] push Alias, ['/icons/'=$MY::basePath/icons/]; $Directory{$MY::basePath.'/icons'}={ Options='Indexes Multiviews', AllowOverride='None', Order='allow,deny', Allow='from all' }; $Location{/icons/}= { SetHandler='default-handler

Re: perl section: Files under Directory - whats wrong here?

2002-07-31 Thread PVM
] Subject: Re: perl section: Files under Directory - whats wrong 07/30/2002 here? 10:17 AM

perl section: Files under Directory - whats wrong here?

2002-07-18 Thread PVM
Now why doesn't this work in a perl /perl section, : $Directory = { '/usr/local/httpd/htdocs/capmon/' = { 'Files' = { '_*.mod' = { 'PerlHandler' = 'Apache::Registry', 'PerlSendHeader' = 'On', 'PerlSetEnv' = [ 'PERL5LIB', '/opt/capmon/inc:/usr

Re: Perl Section Bug?

2002-02-20 Thread Michael Schout
On 13 Feb 2002, Salvador Ortiz Garcia wrote: Ok, I found it. Right now all Location, Directory and Files are afected by being upgraded at random to the Match versions. Can you please test the following patch for perl_config.c: You might be intersted to know that this patch also fixes

Re: Perl Section Bug?

2002-02-14 Thread David Wheeler
On Wed, 2002-02-13 at 20:44, Salvador Ortiz Garcia wrote: Ok, I found it. Right now all Location, Directory and Files are afected by being upgraded at random to the Match versions. Ugly. Can you please test the following patch for perl_config.c: snip / Yes, that does indeed correct the

Re: Perl Section Bug?

2002-02-13 Thread David Wheeler
On Fri, 2002-02-08 at 20:25, Salvador Ortiz Garcia wrote: Yes, It's a bug in Perl Sections. Confirmed in 1.26. snip / I'm digging into it. Thanks. I'm glad to know that I'm not imagining things. We've just found a place in Bricolage where the Location directive *does* work as expected. So

Re: Perl Section Bug?

2002-02-13 Thread Salvador Ortiz Garcia
On Wed, 2002-02-13 at 13:44, David Wheeler wrote: On Fri, 2002-02-08 at 20:25, Salvador Ortiz Garcia wrote: Yes, It's a bug in Perl Sections. Confirmed in 1.26. snip / I'm digging into it. Thanks. I'm glad to know that I'm not imagining things. We've just found a place in Bricolage

Re: Perl Section Bug?

2002-02-08 Thread Salvador Ortiz Garcia
Yes, It's a bug in Perl Sections. Confirmed in 1.26. But it is worse. With the following in httpd.conf try /info vs /status vs /status/info vs /info/status, with and without the commented part, (if one section fails, if two sections works) Perl $Location{'/status'} = { SetHandler =

Perl Section Bug?

2002-02-01 Thread David Wheeler
Okay, let me try again. I have a simple module I've written that demonstrates the problem. here it is: package MyTest; our $VERSION = '0.1'; use Apache; sub one { print STDERR One\n; print STDOUT One\n; return Apache::OK; } sub two { print STDERR Two\n; print STDOUT Two\n;

Re: Perl Section Bug?

2002-02-01 Thread David Wheeler
On Fri, 2002-02-01 at 18:56, David Wheeler wrote: snip / Why is this? It seems to be acting like LocationMatch directives rather than Location. Could this be a bug in how the Perl sections work? If not, how do I get that last request to print Two instead of One? Even if it *is* a bug, how

Setting Perl-stuff inside Perl section

2001-10-05 Thread raptor
hi, How can I set in perl section, say : PerlModule Blah.pm PerlSetVar XXX On PerlSetVar YYY Off and similar... $VirtualHost{address} = { PerlModule = 'Blah.pm', PerlSetVar = { XXX = 'On', YYY = 'Off' } }; !!?! Thanx = iVAN [EMAIL PROTECTED] =

Re: Setting Perl-stuff inside Perl section

2001-10-05 Thread Scott Lanning
On Fri, 5 Oct 2001, raptor wrote: How can I set in perl section, say : PerlModule Blah.pm PerlSetVar XXX On PerlSetVar YYY Off perl @PerlModule = qw(Blah); # add others to the list push @PerlSetVar, [ XXX = 'On' ]; push @PerlSetVar, [ YYY = 'Off' ]; /perl There's good examples in the eagle

Re: Setting Perl-stuff inside Perl section

2001-10-05 Thread Perrin Harkins
@PerlModule = qw(Blah); # add others to the list Might as well just say use Blah;, I think. - Perrin

RE: Setting Perl-stuff inside Perl section

2001-10-05 Thread Geoffrey Young
-Original Message- From: Perrin Harkins [mailto:[EMAIL PROTECTED]] Sent: Friday, October 05, 2001 2:26 PM To: Scott Lanning; [EMAIL PROTECTED] Subject: Re: Setting Perl-stuff inside Perl section @PerlModule = qw(Blah); # add others to the list Might as well just say use

Re: Setting PerlRequire in a Perl section

2001-09-21 Thread Perrin Harkins
Actually, yes, I had. PerlVINC is not really what I needed, the goal was not to reload %INC per VirtualHost, the need was to have a single PerlRequire set up @INC properly per VirtualHost (so Apache::StatINC would work). Ordinary this would have been done with something like 'use lib

RE: Setting PerlRequire in a Perl section

2001-09-21 Thread Alex Harper
we could use $0 to find the path to app.httpd.conf) but attempting to do too much in a Perl section seemed to constantly cause breaks (I eventually gave up). As I mentioned previously we switched to absolute paths in the per-application startup.pl file. Its a pain to maintain a per-server times

Re: Setting PerlRequire in a Perl section

2001-09-21 Thread Perrin Harkins
I understood the limitation of the single interpreter, the problem again was to append to @INC per VirtualHost. It's confusing when you say that, since there's only one @INC for everything. I'm interpreting this as meaning that you have a bunch of applications with different install

RE: Setting PerlRequire in a Perl section

2001-09-21 Thread Alex Harper
we would like is the per-server master httpd.conf. The difference (or lack thereof) between PerlRequire and require in a Perl section wa lost on me. Thanks for the tip. Well, what Stas was talking about with mod_perl 2 was just having different Perl interpreters (with different @INCs) per

Re: Setting PerlRequire in a Perl section

2001-09-20 Thread Stas Bekman
Alex Harper wrote: Hi, I'm trying to configure a PerlRequire directive in a Perl section of an .htaccess file. This is done so that I can have several directories (one per VirtualHost) load a different PerlRequire startup without resorting to absolute paths for the startup for each

RE: Setting PerlRequire in a Perl section

2001-09-20 Thread Alex Harper
mod_perl 2.0 has solved these problems already, but it's not in production yet :) Well that give me something to look forward to :-) Have you read this one? http://perl.apache.org/guide/config.html#Is_There_a_Way_to_Modify_INC_o n You probably need to

Re: Setting PerlRequire in a Perl section

2001-09-20 Thread Stas Bekman
Alex Harper wrote: mod_perl 2.0 has solved these problems already, but it's not in production yet :) Well that give me something to look forward to :-) Have you read this one? http://perl.apache.org/guide/config.html#Is_There_a_Way_to_Modify_INC_o n

Setting PerlRequire in a Perl section

2001-09-19 Thread Alex Harper
Hi, I'm trying to configure a PerlRequire directive in a Perl section of an .htaccess file. This is done so that I can have several directories (one per VirtualHost) load a different PerlRequire startup without resorting to absolute paths for the startup for each VirtualHost. Since FindBin

Re: Converting Perl section variables into plain text directives

2001-08-25 Thread Cees Hek
On Fri, 24 Aug 2001, Eric Hammond wrote: Is there any way to take the Apache::ReadConfig name space (variables set in Perl sections) and generate plain text Apache directives? I don't know if there is a simple answer to this one, but the way I would handle it is to scrap the Perl sections,

PERL5LIB perl section

2001-08-06 Thread Bill Moseley
In a previous post today I mentioned how I was running mod_perl from the build directory by setting a PERL5LIB. I seem to need to add: perl /perl at the top of httpd.conf. Otherwise I get: Apache.pm version 1.27 required! /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Apache.pm is version

Re: PERL5LIB perl section

2001-08-06 Thread Stas Bekman
On Mon, 6 Aug 2001, Bill Moseley wrote: In a previous post today I mentioned how I was running mod_perl from the build directory by setting a PERL5LIB. I seem to need to add: perl /perl at the top of httpd.conf. Otherwise I get: Apache.pm version 1.27 required!

Final form of perl config code [Was: RE: What the heck actuallyhappens in a perl section?]

2001-04-18 Thread Thomas K. Burkholder
Thanks to those who helped out with this. Nobody quite got the case of beer, but here's the final form, just in case anyone ever needs something similar to this in the future. It's pretty ugly still (and I know there are some better ways for some of this), but I could see it being useful in

What the heck actually happens in a perl section?

2001-04-17 Thread Thomas K. Burkholder
Hi again, I'm still beating my head against perl sections. Using PerlSetVar inside $Location seems really flaky - constants work, variables vanish. And using $Location{$key} = {...} causes odd spurious multiple-matching behaviour from a single matching hit. Frankly, I'm at a loss. I'm about

RE: What the heck actually happens in a perl section?

2001-04-17 Thread Geoffrey Young
-Original Message- From: Thomas K. Burkholder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 17, 2001 6:40 AM To: [EMAIL PROTECTED] Subject: What the heck actually happens in a perl section? Hi again, I'm still beating my head against perl sections. Using PerlSetVar

Re: What the heck actually happens in a perl section?

2001-04-17 Thread Thomas K. Burkholder
Geoffrey Young wrote I'm surprised that this works at all... what's in @kv at this point? if it's only two values then it might work if there is some magic behind the scenes, but generally you can't store references in PerlSetVars without having them stringified. Maybe PerlAddVar would

PerlModule vs use in a Perl section

2001-03-01 Thread Pierre Phaneuf
I was using Apache::Status to learn a bit about what is loaded by my server, and I am wondering about a detail... If I put this: Perl use Apache::Foo; /Perl Or this: PerlModule Apache::Foo I would expect the two to behave the same, but they don't! The "use" in the Perl section

bug in Perl section processing.

2001-02-19 Thread Michael J Schout
I have isolated a problem in Perl section processing that I have been encountering. Basically there are situations where one particular entry in %Location or %LocationMatch causes the *NEXT* entry to fail to configure properly. I have a standard httpd configuration, and then the following

Perl section woe

2001-02-17 Thread Jie Gao
= ( [ '/icons/compressed.gif' = qw(.Z .z .gz .tgz .zip) ], [ '/icons/layout.gif' = qw(.html .shtml .htm .pdf) ], ) I am testing the limit directives in my Perl section: %LocationMatch = ( '^/(myscript|cgi-bin)/' = { 'AuthName' = 'Elephant', 'AuthType

Re: Perl section woe

2001-02-17 Thread Erdmut Pfeifer
the AddIcon directive shows how: @AddIcon = ( [ '/icons/compressed.gif' = qw(.Z .z .gz .tgz .zip) ], [ '/icons/layout.gif' = qw(.html .shtml .htm .pdf) ], ) I am testing the limit directives in my Perl section: %LocationMatch = ( '^/(myscript|cgi

Re: Perl section woe

2001-02-17 Thread Jie Gao
On Sat, 17 Feb 2001, Erdmut Pfeifer wrote: On Sat, Feb 17, 2001 at 08:56:40PM +1100, Jie Gao wrote: %LocationMatch = ( '^/(myscript|cgi-bin)/' = { 'AuthName' = 'Elephant', 'AuthType' = 'Animals', 'AuthDBMUserFile' = '/mydir/userdbm',

Re: Perl Section questions

2000-06-01 Thread Doug MacEachern
On Wed, 31 May 2000, Kees Vonk 7249 24549 wrote: I have two questions about perl sections: 1) Has setting an entry in the %ENV hash in a perl section the same effect as using a SetEnv (or PerlSetEnv) no, %ENV is cleared at startup, you need to use the *Env directives for any you want

Perl Section questions

2000-05-31 Thread Kees Vonk 7249 24549
I have two questions about perl sections: 1) Has setting an entry in the %ENV hash in a perl section the same effect as using a SetEnv (or PerlSetEnv) directive (What btw is the difference between SetEnv and PerlSetEnv, both seem to effect %ENV in the same way.) 2) If the order

Re: Perl Section...

2000-04-20 Thread w trillich
while($domain = $sth-fetchrow_array) { $PerlConfig .= "CONFIG"; VirtualHost $ipAddr ServerName www.$domain ServerAdmin webmaster@$domain ServerAlias $domain DocumentRoot $baseDir/www.$domain/htdocs/ /VirtualHost CONFIG } doesn't $sth-fetchrow_array() return a

Re: Perl Section...

2000-04-20 Thread darren chamberlain
w trillich ([EMAIL PROTECTED]) said something to this effect: while($domain = $sth-fetchrow_array) { $PerlConfig .= "CONFIG"; VirtualHost $ipAddr ServerName www.$domain ServerAdmin webmaster@$domain ServerAlias $domain DocumentRoot

Perl Section...

2000-04-19 Thread Bryan J. Opfer
) IMP_DATA undef in 'DBD::mysql::dr' This error comes up in my apache error log. I have a Perl section in my httpd.conf that sets up all my virtual hosts. Apache starts up fine, but the virtual hosts are not set up and I get that error in the error log. I am using Apache 1.3.12 compiled from

RE: Perl Section...

2000-04-19 Thread Geoffrey Young
-Original Message- From: Bryan J. Opfer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 19, 2000 3:27 PM To: Modperl List Subject: Perl Section... Anyone know what this error would mean: DBI handle cleared whilst still active at /usr/lib/perl5/site_perl/5.005/i386-linux

Re: Perl Section...

2000-04-19 Thread Bryan J. Opfer
Wednesday, April 19, 2000 3:27 PM To: Modperl List Subject: Perl Section... Anyone know what this error would mean: DBI handle cleared whilst still active at /usr/lib/perl5/site_perl/5.005/i386-linux/DBI.pm line 195. dbih_clearcom (h 0x83b1900, com 0x81b6d50): FLAGS

How do I get the Location .. uri in a Perl section?

1999-11-09 Thread Robert Bedell
section. Or rather, the class method inside it. This may seem trivial, but I also don't want to use the string '/uri' anywhere in in the Perl section. In the past I've been pressed for time so I've simply added a PerlSetVar for a key of some sort and used that key when configuring: PerlSetVar