Are using Apache::DBI and establishing a connection in
your startup.pl?
On Mon, 23 Oct 2000, Differentiated Software Solutions Pvt. Ltd wrote:
> Hi,
> I have started with one httpd; and executed the following mod-perl program from
>the browser. We've configured apache to have persistent DBI
> The idea is first time the database handle will be inactive and it will print
>'INSIDE'. From the second time onwards the database handle will be active and it
>will print 'OUTSIDE'. This is working.
> But, sometimes the 'OUTSIDE' comes from the third or fourth time only. (that is
>it takes more than one attempt to become persistent) Why it is happening like this?
> Thanks
> Muthu S Ganesh
>
> mod-perl code is here:
>
> $rc = $dbh_pg->{Active};
> print "$$: $rc\n";
> if($rc eq '')
> {
> print "INSIDE\n";
> $dbh_pg =
>DBI->connect("dbi:Pg:dbname=adcept_smg_ctrl","postgres","postgres",{RaiseError => 1})
>|| die $DBI::errstr;
> }
> else
> {
> print "OUTSIDE\n";
> }
>
>
> Differentiated Software Solutions Pvt. Ltd.
> 176, Ground Floor, 6th Main,
> 2nd Block, RT Nagar
> Bangalore - 560032
> Phone : 91 80 3431470
> www.diffs-india.com
>
--
Jeff Beard
___________________________________
Web: www.cyberxape.com
Location: Boulder, CO, USA