Apache::DBI->connect_on_init

2006-08-01 Thread Vladimir S. Tikhonjuk
Hi all! There are some problem with subj :) I made Apache-DBI-startup.pl script: # BEGIN Apache-DBI-startup.pl Apache::DBI->connect_on_init( 'dbi:Pg:dbname=database;host=database', 'user', 'password', { PrintError => 1, RaiseError => 1

Apache::DBI connect_on_init problem

2010-04-17 Thread Jiri Pavlovsky
Hello, I'm trying to prestart db connection. But Apache::DBI->connect_on_init is not working. Gives no error, but db connection is not made. Setting $Apache::DBI::DEBUG = 2 indicates that ChildInitHandler runs. I tried to create my custom ChildInitHandler and start db connection fro

Re: Apache::DBI->connect_on_init

2006-08-01 Thread Jonathan Vanasco
On Aug 1, 2006, at 6:25 AM, Vladimir S. Tikhonjuk wrote: Well, when I put "use Apache::DBI" into Apache-DBI-startup.pl script - no errors. Because you need to import Apache::DBI before you call any of its methods- same as any other perl script. But I don't see any connections to the Datab

Re: Apache::DBI->connect_on_init

2006-08-01 Thread Vladimir S. Tikhonjuk
Well, I installed last versions of Apache ( 2.0.58 ), DBI ( 1.50 ), Apache-DBI ( 1.01 ) and mod_perl ( 2.0.2 ). Here is my stutup file: # Start of apache-dbi-startup.pl use Apache::DBI; use DBI; $Apache::DBI::DEBUG = 1; Apache::DBI->connect_on_init( "dbi:Pg:dbname=database;host=l

Re: Apache::DBI->connect_on_init

2006-08-07 Thread Perrin Harkins
On Wed, 2006-08-02 at 09:15 +0300, Vladimir S. Tikhonjuk wrote: > Apache starts without errors, but there are not any connection to > Database. What's wrong ? Set $Apache::DBI::DEBUG to 2 and look for "PerlChildInitHandler" in the error_log. If you don't see it, the connect_on_init is not getting

Re: Apache::DBI connect_on_init problem

2010-04-17 Thread Chris Bennett
On 04/17/10 14:27, Jiri Pavlovsky wrote: Hello, I'm trying to prestart db connection. But Apache::DBI->connect_on_init is not working. Gives no error, but db connection is not made. Setting $Apache::DBI::DEBUG = 2 indicates that ChildInitHandler runs. I tried to create m

Re: Apache::DBI connect_on_init problem

2010-04-17 Thread Jiri Pavlovsky
On 17.4.2010 22:22, Chris Bennett wrote: On 04/17/10 14:27, Jiri Pavlovsky wrote: Hello, I'm trying to prestart db connection. But Apache::DBI->connect_on_init is not working. Gives no error, but db connection is not made. Setting $Apache::DBI::DEBUG = 2 indicates that ChildInitHand

Re: Apache::DBI connect_on_init problem

2010-04-17 Thread Fred Moyer
On Sat, Apr 17, 2010 at 1:09 PM, Jiri Pavlovsky wrote:>  Apache::DBI->connect_on_init("dbi:Pg:dbname=p69", >    "user", >    "pass", >    { >      PrintError => 1, # warn() on errors >      RaiseError => 0, # don't die

Re: Apache::DBI connect_on_init problem

2010-04-17 Thread Chris Bennett
On 04/17/10 15:09, Jiri Pavlovsky wrote: On 17.4.2010 22:22, Chris Bennett wrote: On 04/17/10 14:27, Jiri Pavlovsky wrote: Hello, I'm trying to prestart db connection. But Apache::DBI->connect_on_init is not working. Gives no error, but db connection is not made. Setting $Apache::DB

Re: Apache::DBI connect_on_init problem

2010-04-17 Thread Jiri Pavlovsky
On 17.4.2010 22:42, Chris Bennett wrote: Oh, this is your error. You may only use Apache::DBI_connect_on_init for ONE connection, which stays up and running. Use your more important one (for speed) for this. This doesn't seem to make difference. It doesn't work even when making only one con

Re: Apache::DBI connect_on_init problem

2010-04-17 Thread Jiri Pavlovsky
On 17.4.2010 23:21, Jiri Pavlovsky wrote: On 17.4.2010 22:42, Chris Bennett wrote: Oh, this is your error. You may only use Apache::DBI_connect_on_init for ONE connection, which stays up and running. Use your more important one (for speed) for this. This doesn't seem to make difference. It

Re: Apache::DBI connect_on_init problem

2010-04-19 Thread Perrin Harkins
On Sat, Apr 17, 2010 at 4:42 PM, Chris Bennett wrote: > You may also have other connections, but these will reconnect-disconnect > each time For the record, Apache::DBI will work with any number of connections, keeping them persistent. It's also correct to call connect_on_init multiple times. I

Apache::DBI / connect_on_init not setting dbi_connect_method but later connect() calls do

2009-01-02 Thread Marinos Yannikos
Hi, I'm trying to initiate connections in startup.pl for later use (mod_perl 1.xx): (startup.pl): use Apache::DBI; ... Apache::DBI->connect_on_init( 'dbi:Pg:dbname=mydb;host=myhost;port=5432', 'nobody',''); Later, I am attempting to reuse th

Re: Apache::DBI / connect_on_init not setting dbi_connect_method but later connect() calls do

2009-01-02 Thread Philip M. Gollucci
Apache::DBI->connect_on_init( 'dbi:Pg:dbname=mydb;host=myhost;port=5432', 'nobody',''); Can this be avoided somehow so that only 1 connection is initiated and reused? Is my DBI(1.53) or Apache::DBI(1.04) too old? Is it a bad idea to set

Re: Apache::DBI / connect_on_init not setting dbi_connect_method but later connect() calls do

2009-01-02 Thread Philip M. Gollucci
Apache::DBI->connect_on_init( 'dbi:Pg:dbname=mydb;host=myhost;port=5432', 'nobody',''); Can this be avoided somehow so that only 1 connection is initiated and reused? Is my DBI(1.53) or Apache::DBI(1.04) too old? Is it a bad idea to set