perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Webmas...@aol.com
Subject Urgent Assistantance Needed!
Date Sun, 02 Jul 2000 17:41:18 GMT
Hello. I am trying to get persistant connections for my cgi-scripts using DBI 
and Mysql.  I just moved to my own dedicated server and don't have much 
knowledge. I will try to be as detail as possible because when (and if) I get 
a reply I would like it to be detailed. 

In the httpd.conf I added 1 line near top before anything else saying
PerlRequire /home/traffic1/startup.pl

I then opened startup.pl and added

sub Apache::DBI::db::ping {
my $dbh = shift;
return $dbh->do('select 1');
}

Also I put $Apache::DBI::DEBUG = 2;

for debugging.

When I restarted httpd everything still worked however I do not know if 
persistant connections are working. I did not see anything relating to that 
in my error logs.

In my cgi scripts this is what I am doing

use DBI;
$dbh = 
DBI->connect("dbi:mysql:$mysqldatabase","$mysqlusername","$mysqlpassword") || 
die("Couldn't connect to database!\n");;
&selectbanners;
$dbh->disconnect;

I am very fustrated now and I need as much help as I can get. Please direct 
me to what I may be doing wrong.




==========================
Customer Support
Traffic Exchange 
http://www.traffic-exchange.com
1-888-835-3268 Ext: 15676

Mime
View raw message