You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by We...@aol.com on 2000/07/02 23:41:18 UTC

Urgent Assistantance Needed!

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

Re: Urgent Assistantance Needed!

Posted by Perrin Harkins <pe...@primenet.com>.
On Sun, 2 Jul 2000 Webmast98@aol.com wrote:
> Hello. I am trying to get persistant connections for my cgi-scripts using DBI 
> and Mysql.

I didn't see a "use pache::DBI;" or a "PerlModule apche::DBI" anywhere is
your post.  Did you forget it?
- Perrin