Using mod_dbd for mysql in XAMPP(with Apache/PHP)

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Using mod_dbd for mysql in XAMPP(with Apache/PHP)

Postby dharm0us » 04. June 2008 15:10

I want to implement database connection pooling in my current setup.
I am using XAMPP(PHP/MySql/Apache)/Windows XP.

I read about mod_dbd here :
and other places.

So I added these lines to httpd.conf in xampp/Apache/Conf/httpd.conf file :

LoadModule dbd_module modules/

<IfModule dbd_module>
DBDKeep 3
DBDPersist On
DBDriver mysql
DBDMax 3

Now, if I restart xampp, I get this :
DBD : No Driver for MySql and Apache doesn't start.
How to fix this?

Secondly, I commented out this line :
"DBDriver mysql"

after which Apache started.
Then I executed the following PHP Script multiple times :
$db_uname = 'root';
$db_pass = '';
$db_name = 'some_db';
$db_host = 'localhost';
$link = mysql_connect($db_host, $db_uname, $db_pass);
if (!$link) {
die('Could not connect: ' . mysql_error());
else {
echo 'Connected successfully<br>';

Now I went to MySql command prompt and saw the number of connections
with :

and it increases every time I execute the script and
DBDKeep 3
DBDMax 3

have no effect on the number of connections.

Is it because this module has not been loaded?
Is it the correct way to verify that mod_dbd is working,
i.e. number of open connections shouldn't exceed 3?

Else, how do I verify that mod_dbd is working?

Or if mod_dbd cannot work with XAMPP,
what is the alternative for connection pooling
using XAMPP(PHP)?
Posts: 1
Joined: 04. June 2008 15:06

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 72 guests