RE: Using class wide variables under mod_perl is safe?

2003-10-08 Thread Morton-Allen, Matt
I should have also mentioned that not only does the "returned" come back out of order there are also more than there should be. There's 3 calls and 4 results. Worse it now appears that if I hit the server long enough to come back to the same process the value has stayed put. I assume this is why t

RE: Using class wide variables under mod_perl is safe?

2003-10-08 Thread Perrin Harkins
On Wed, 2003-10-08 at 23:33, Morton-Allen, Matt wrote: > I am using Apache::DBI and would be at a loss without it (we use Oracle > so the connection overhead is serious). With this in mind is it such a > bad thing to hang on to the one handle for an execution? No that's fine. I suggest you do it

RE: Using class wide variables under mod_perl is safe?

2003-10-08 Thread Morton-Allen, Matt
Hi, Thanks for the detailed information that's great. A couple of things though. > A database handle is a bad example. You actually should use Apache::DBI > for that, since it will make sure the handle hasn't timed out and deal > with rolling back any pending transactions if your code dies. So,

RE: Using class wide variables under mod_perl is safe?

2003-10-08 Thread Perrin Harkins
Hi, You're making this much harder than it needs to be. For one thing, this is the wrong place to use inheritance, and for another, globals are okay if used intelligently. A database handle is a bad example. You actually should use Apache::DBI for that, since it will make sure the handle hasn't

RE: Using class wide variables under mod_perl is safe?

2003-10-08 Thread Morton-Allen, Matt
Ok, I am little confused now. I have changed the code to the following: Master -- package test::master; our $dbh; sub dbh { == snip == return $dbh; } Client -- packge test::client; use test::master; use vars qw(test::master); @ISA = qw(test::master); our $dbh; sub

Re: Using class wide variables under mod_perl is safe?

2003-10-08 Thread Matisse Enzer
First of all, you probably want to have your httpd.conf file have: PerlModule Apache::DBI that will take care of connection pooling for each Apache child process. Any attempt to connect to the database will get an existing handle back if one has already been created using the same DSN/user/

Re: mod_perl 2: $r->get_server_port returns wrong value

2003-10-08 Thread Matisse Enzer
At 8:14 PM -0400 10/8/03, Geoffrey Young wrote: This doesn't make sense to me, because I had believed that get_server_port gets its information from the server side only, but perhaps i am mistaken about that. yes, you are. if UseCanonicalName is set to Off or DNS, first the incoming URI is chec

Re: mod_perl 2: $r->get_server_port returns wrong value

2003-10-08 Thread Geoffrey Young
Matisse Enzer wrote: Is it possible that the value returned by $r->get_server_port could be affected by the format or content of the client request? yes I've got a test case where when i hit the same URL from two different clients I get different values from $r->get_server_port. This doesn't

Using class wide variables under mod_perl is safe?

2003-10-08 Thread Morton-Allen, Matt
Hi, I'm trying to find a way in which I can stash some commonly used data (e.g. a database handle) in a location that I can access from anywhere within a large OO mod_perl application. After learning the ills of using globals under mod_perl the hard way I am now toying with the use of class wide

Re: mod_perl 2: $r->get_server_port returns wrong value

2003-10-08 Thread Matisse Enzer
Title: Re: mod_perl 2: $r->get_server_port returns wrong valu More on my own question: It *seems* that get_server_port gives the wrong answer when responding to an HTTP/1.0 request. That is, it always says port '80' for HTTP/1.0 Should I report this as a bug? (Apache/2.0.47 (Unix) mod_perl/1.9

mod_perl 2: $r->get_server_port returns wrong value

2003-10-08 Thread Matisse Enzer
Is it possible that the value returned by $r->get_server_port could be affected by the format or content of the client request? I've got a test case where when i hit the same URL from two different clients I get different values from $r->get_server_port. This doesn't make sense to me, because I h

Re: Mod_perl with NLDBM issue

2003-10-08 Thread Chris M
On 10/8/03 12:45 PM, "Stas Bekman" <[EMAIL PROTECTED]> wrote: > Chris M wrote: > >>> The opening is , but the clsoing is . It wan't the space in >>> the >>> opening tag, because in httpd-2.0 the parser requires an argument in all >>> containers (with a leading space), so opening is invalid, but

Re: $ENV{PATH} and PerlTaintCheck On

2003-10-08 Thread Ged Haywood
Hi Stas, On Wed, 8 Oct 2003, Stas Bekman wrote: > Ged Haywood wrote: > > On Wed, 8 Oct 2003, James Tolley wrote: > > > >>How can I untaint $ENV{PATH}?? > > > > You have to do it in those (appropriate) places where the data appear, > > in every request. Use a substitution command to convert ch

Re: $ENV{PATH} and PerlTaintCheck On

2003-10-08 Thread Ged Haywood
Hi there, On Wed, 8 Oct 2003, James Tolley wrote: > Date::Manip is used from a module that's used from a handler. Perl dies > when I try to ParseDate or Unixdate a date - saying that $ENV{PATH} is > insecure. > > I've tried to set $ENV{PATH} = '...' in a BEGIN block, and I've tried > setting it

Re: $ENV{PATH} and PerlTaintCheck On

2003-10-08 Thread Stas Bekman
James Tolley wrote: Hi, Date::Manip is used from a module that's used from a handler. Perl dies when I try to ParseDate or Unixdate a date - saying that $ENV{PATH} is insecure. I've tried to set $ENV{PATH} = '...' in a BEGIN block, and I've tried setting it from PerlSetEnv PATH ... How can I untai

$ENV{PATH} and PerlTaintCheck On

2003-10-08 Thread James Tolley
Hi, Date::Manip is used from a module that's used from a handler. Perl dies when I try to ParseDate or Unixdate a date - saying that $ENV{PATH} is insecure. I've tried to set $ENV{PATH} = '...' in a BEGIN block, and I've tried setting it from PerlSetEnv PATH ... How can I untaint $ENV{PATH}?? M

Re: Mod_perl with NLDBM issue

2003-10-08 Thread Stas Bekman
Chris M wrote: So does it work ok now? No it doesn't work. And I'm probably no further along to understanding why since the docs are horked :) Here is what I get: Starting httpd: Syntax error on line 1112 of /etc/httpd/conf/httpd.conf: Perl not allowed here Here's the config: PerlModule Apach

Re: Mod_perl with NLDBM issue

2003-10-08 Thread Stas Bekman
Chris M wrote: The opening is , but the clsoing is . It wan't the space in the opening tag, because in httpd-2.0 the parser requires an argument in all containers (with a leading space), so opening is invalid, but it's always in closing. That is certain

Re: Mod_perl with NLDBM issue

2003-10-08 Thread Chris M
On 10/8/03 12:11 PM, "Stas Bekman" <[EMAIL PROTECTED]> wrote: > Chris M wrote: >> On 10/8/03 10:14 AM, "Stas Bekman" <[EMAIL PROTECTED]> wrote: >> >> >>> Chris M wrote: >>> I am trying to get a new configuration going. When I start 2.0.47 I get: # /etc/rc.d/init.d/httpd start >

Re: Mod_perl with NLDBM issue

2003-10-08 Thread Stas Bekman
Chris M wrote: On 10/8/03 10:14 AM, "Stas Bekman" <[EMAIL PROTECTED]> wrote: Chris M wrote: I am trying to get a new configuration going. When I start 2.0.47 I get: # /etc/rc.d/init.d/httpd start Starting httpd: Syntax error on line 1110 of /etc/httpd/conf/httpd.conf: directive missing closi

simple two server (front end - back end) setup help

2003-10-08 Thread Patrick Galbraith
Hi there everyone, I'm setting up a simple two server setup with mod_perl. I've tested static documents, and they work fine. The ones I have a rewrite rule for are served by the front end, and the ones not in the rule by the backend. The problem comes when I run perl scripts (via Apache::Regis

Re: Mod_perl with NLDBM issue

2003-10-08 Thread Chris M
On 10/8/03 11:09 AM, "Josh Chamas" <[EMAIL PROTECTED]> wrote: > Chris M wrote: >> I am trying to get a new configuration going. When I start 2.0.47 I get: >> >> # /etc/rc.d/init.d/httpd start >> >> Starting httpd: Syntax error on line 1110 of /etc/httpd/conf/httpd.conf: >> directive missing cl

Mod_perl with NLDBM issue

2003-10-08 Thread Chris M
On 10/8/03 10:14 AM, "Stas Bekman" <[EMAIL PROTECTED]> wrote: > Chris M wrote: >> I am trying to get a new configuration going. When I start 2.0.47 I get: >> >> # /etc/rc.d/init.d/httpd start >> >> Starting httpd: Syntax error on line 1110 of /etc/httpd/conf/httpd.conf: >> directive missing cl

Re: Mod_perl with NLDBM issue

2003-10-08 Thread Josh Chamas
Chris M wrote: I am trying to get a new configuration going. When I start 2.0.47 I get: # /etc/rc.d/init.d/httpd start Starting httpd: Syntax error on line 1110 of /etc/httpd/conf/httpd.conf: directive missing closing '>' [FAILED] Line 1110 is the line below: PerlModule Apache::ASP

Re: Mod_perl with NLDBM issue

2003-10-08 Thread Stas Bekman
Chris M wrote: I am trying to get a new configuration going. When I start 2.0.47 I get: # /etc/rc.d/init.d/httpd start Starting httpd: Syntax error on line 1110 of /etc/httpd/conf/httpd.conf: directive missing closing '>' [FAILED] It should be in mp2. ^ sp

Mod_perl with NLDBM issue

2003-10-08 Thread Chris M
I am trying to get a new configuration going. When I start 2.0.47 I get: # /etc/rc.d/init.d/httpd start Starting httpd: Syntax error on line 1110 of /etc/httpd/conf/httpd.conf: directive missing closing '>' [FAILED] Line 1110 is the line below: PerlModule Apache::ASP

Re: Apache bandwidth calculating

2003-10-08 Thread Abd El-Hameed Mohammed
Thank you very much. I 'll do my best to help you improve this module. Thank you. - Original Message - From: "Skylos the Doggie" <[EMAIL PROTECTED]> To: "Abd El-Hameed Mohammed" <[EMAIL PROTECTED]> Cc: "Ged Haywood" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, October 07, 2003

Re: [mp2 module rfc] Apache::Filter::HTTPHeadersManip

2003-10-08 Thread Ruslan U. Zakirov
Stas Bekman wrote: Ged Haywood wrote: Hi Stas, On Tue, 7 Oct 2003, Stas Bekman wrote: came up with Apache::Filter::HTTPHeadersManip which you can try [snip] If you have comments regarding the naming http://www.m-w.com/cgi-bin/dictionary?manipulate I wonder if "Manip" would be better replace

RE: [QUESTION] Relating a request to a response

2003-10-08 Thread Pringle, Chris (HP-PSG)
I would be quite interested in testing it once it's complete. --- Regards, Chris Pringle UK PSG Hewlett-Packard, Bristol Tel: +44 117 31 29664 Mob: +44 7793 681024 > -Original Message- > From: Stas Bekman [mailto:[EMAIL PROTECTED] > Sent: 07 October 2003 17:27 > To: Pringle, Chris (HP-

Re: [mp2 module rfc] Apache::Filter::HTTPHeadersManip

2003-10-08 Thread Stas Bekman
Ged Haywood wrote: Hi Stas, On Tue, 7 Oct 2003, Stas Bekman wrote: came up with Apache::Filter::HTTPHeadersManip which you can try [snip] If you have comments regarding the naming http://www.m-w.com/cgi-bin/dictionary?manipulate I wonder if "Manip" would be better replaced by "Alter". If th

Re: [mp2 module rfc] Apache::Filter::HTTPHeadersManip

2003-10-08 Thread Ged Haywood
Hi Stas, On Tue, 7 Oct 2003, Stas Bekman wrote: > came up with Apache::Filter::HTTPHeadersManip which you can try > [snip] > If you have comments regarding the naming http://www.m-w.com/cgi-bin/dictionary?manipulate I wonder if "Manip" would be better replaced by "Alter". If the reader is not