This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
To: Edmar Edilton da Silva <ra990878@ic.unicamp.br> From: Stas Bekman <stas@stason.org> Subject: Re: Perl scripts with Apache::DBI !!! Date: Sun, 3 Dec 2000 00:48:30 +0100 (CET) On Sat, 2 Dec 2000, Edmar Edilton da Silva wrote: > Hi folks, > > I am not sure if my perl scripts are running under Apache::DBI. > How can I check if they are using database connections which was already > openned. Is there any command that I can add to the perl script for it > tell me if was opens a new connection with the database or if it used a > connection already opened? > Thanks for any help!!! perldoc Apache::DBI (hint: /DEBUG) or http://perl.apache.org/guide (hint: databases) === To: Stas Bekman <stas@stason.org> From: Aaron Johnson <solution@gina.net> Subject: Re: Perl scripts with Apache::DBI !!! Date: Sat, 02 Dec 2000 20:04:39 -0500 If this is in the guide forgive me. Hopefully you are using a perlstartup.pl or something similar to load most main modules at server start time. If you are make sure you have: Apache::Status Apache::DBI in that order in that file (they should also be above the use DBI if you have it). Then if you have perl-status enabled you will be able to see how many connections you have living at any given time. === To: Edmar Edilton da Silva <ra990878@ic.unicamp.br> From: Perrin Harkins <perrin@primenet.com> Subject: Re: Apache::DBI problem and writting a perl module!!! Date: Sun, 03 Dec 2000 11:49:55 -0800 Edmar Edilton da Silva wrote: > I still didn't solve the problem of the Apache::DBI. It can not be > loaded into the apache's startup.pl file because happens a error during > the starting of the apache, the child processes are not created. For > using the Apache::DBI I had to add the "use Apache::DBI ()" code at the > beginning of each perl script. That will not work. You have to load Apache::DBI before DBI, as it says in the documentation. You need to solve the problem you're getting when putting Apache::DBI in your startup.pl. What's the error? Did you compile your Apache/mod_perl from source? Are you using DSO? === To: Edmar Edilton da Silva <ra990878@ic.unicamp.br>, modperl@apache.org From: "R. K . Mallah" <rajesh.m@egurucool.com> Subject: Problem in loading Apache::DBI Date: Mon, 18 Dec 2000 11:31:17 +0530 --------------5F5B12767535882BBA9E2BFA Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I get following error when i do perl -e 'use Apache::Status;use Apache::DBI' Can't locate object method "module" via package "Apache" at /usr/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 202. Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1. the problem is when preparing menu_item for Apache::Status method module is not found under Apache, do i have to install some other Apache module? anyway i commented out the if part and made it work like Apache::Status->menu_item( 'DBI' => 'DBI connections', sub { my($r, $q) = @_; my(@s) = qw(<TABLE><TR><TD>Datasource</TD><TD>Username</TD></TR>); for (keys %Connected) { push @s, '<TR><TD>', join('</TD><TD>', (split($;, $_))[0,1]), "</TD></TR>\n"; } push @s, '</TABLE>'; return \@s; } ); # ) if ($INC{'Apache.pm'} and Apache->module('Apache::Status')); is it correct ? why shouldn't it load without any modifications ? ===