Apache::DBI

[prev] [thread] [next] [Date index for 2005/01/08]

From: Angie Ahl
Subject: Apache::DBI
Date: 19:07 on 08 Jan 2005
--Apple-Mail-5-202531289
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed

Hi

I posted this to the DBI list yesterday and no replies yet ;(. It's 
just as much a question about mod_perl and persistence as anything else 
so I thought I'd ask you lovely people.

can anyone tell me whether the following will work. I've got myself
all confused over persistency (of every kind).

I'm using Mod_perl and apache (1.3)
I have a httpd.conf containing PerlSetVar for the DB's datasource,
username and password.
I get these values in my perl module using $r->dir_config
I then pass the values to various objects (other perl modules).

eventually I hope to have just one instance of the modules on the
server with paths and db vars all being sent to the modules with
PerlSetVar.

There will be several sites all using the same modules but each will
have its own paths and config for the DB.

Will this work?
Will I have problems with variables becoming "shared" ie vars values
getting mixed up between connections?
Is PerlSetVar the best way to pass values from httpd.conf to perl 
securely?
Do I need to open/close the connection in each of the modules too or
can I pass the $dbh object to each of my external subroutines, or is
there an even better way.

I'm hoping to have a persistent database connection for each request,
but not get values mixed up between requests and sites.

I thought I'd ask the experts here before I go do something really 
bloated.

Make sense?

Thanks


--Apple-Mail-5-202531289
Content-Transfer-Encoding: 7bit
Content-Type: text/enriched;
	charset=US-ASCII

<fontfamily><param>Arial</param><x-tad-bigger>Hi


I posted this to the DBI list yesterday and no replies yet ;(. It's
just as much a question about mod_perl and persistence as anything
else so I thought I'd ask you lovely people.


can anyone tell me whether the following will work. I've got myself

all confused over persistency (of every kind).


I'm using Mod_perl and apache (1.3)

I have a httpd.conf containing PerlSetVar for the DB's datasource,

username and password.

I get these values in my perl module using $r->dir_config

I then pass the values to various objects (other perl modules).


eventually I hope to have just one instance of the modules on the

server with paths and db vars all being sent to the modules with

PerlSetVar.


There will be several sites all using the same modules but each will

have its own paths and config for the DB.


Will this work?

Will I have problems with variables becoming "shared" ie vars values

getting mixed up between connections?

Is PerlSetVar the best way to pass values from httpd.conf to perl
securely?

Do I need to open/close the connection in each of the modules too or

can I pass the $dbh object to each of my external subroutines, or is

there an even better way.


I'm hoping to have a persistent database connection for each request,

but not get values mixed up between requests and sites.


I thought I'd ask the experts here before I go do something really
bloated.


Make sense?


Thanks


</x-tad-bigger></fontfamily>
--Apple-Mail-5-202531289--

(message missing)

Apache::DBI
Angie Ahl 19:07 on 08 Jan 2005

Re: Apache::DBI
Charles P. Frank 19:38 on 08 Jan 2005

Re: Apache::DBI
Perrin Harkins 19:49 on 08 Jan 2005

Re: Apache::DBI
Martin Moss 16:06 on 09 Jan 2005

Apache::DBI
Ian Joyce 04:01 on 30 Jan 2005

Re: Apache::DBI
Perrin Harkins 04:25 on 30 Jan 2005

Re: Apache::DBI
Ian Joyce 05:17 on 30 Jan 2005

Re: Apache::DBI
Perrin Harkins 18:18 on 30 Jan 2005

Generated at 12:39 on 05 Feb 2005 by mariachi v0.52