MSSQL PDO - Error!: could not find driver

MSSQL PDO - Error!: could not find driver

am 04.04.2006 19:34:33 von Phuoc Diec

------=_Part_19692_13869153.1144172073123
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hello,

I got "Error!: could not find driver" when using PDO to connect to MSSQL
2000 running on Windows 2003 server.

I have recently installed Gentoo 2006 with Apache web server 2.0.55-r1, PHP
5.1.2, pecl-pdo 1.0.2, pecl-pdo-dblib 1.0, pecl-pdo-mysql 1.0.1, mysql
4.1.14, and freetds 0.62.3.

When I do phpinfo(), I can see:

PDO drivers with dblib, mysql enabled
PDO Driver for FreeTDS/Sybase DB-lib with freetds enabled
PDO Driver for MySQL, client library version 4.1.14


I got "Error!: could not find driver" when I run the following code:

try {
$dbh =3D new PDO('mssql:host=3D192.168.19.20;dbname=3DTEST_DB',
'test_user', 'test_password');

echo "Connnected.\n";
$dbh =3D null;
} catch (PDOException $e) {
print "Error!: " . $e->getMessage() . "\n";
die();
}

NOTE: I could connect to MySQL database with PDO and I also could connect t=
o
the same MSSQL server with mssql_connect.

Could anyone help me with this problem?

Thank you very much.

Phuoc Diec.

------=_Part_19692_13869153.1144172073123--