Environment -
Windows XP Professional Client running Apache 2.x w/ PHP5. Accessing a Remote SQL Server 2000 DB.
Can Access SQL Server DB w/ standard SQL Server Query Analyzer Tool.
php.ini has the following extensions (in which all dll have been copied to PHP root) php_pdo_mssql.dll, php_msql.dll, php_mssql.dll.
Attempting to access w/ COM approach. Tried mssql_connect, mssql_pconnect both w/ DSN, TCPIP and Name Piples. Cannot seem to make connection. Below is a snippet of the code. I think it is a networking, infrastructure issue, but cannot debug.
Q: Is there anyway to track - how and why the connection is failing? At this point I just know it errors out. So its really tough to debug.
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<h1> SQL/PHP /<h1>
<?php
$HOST = "CSCS02";
$USER = "sa";
$PASS = "mypswd";
$DB = "MY_DB_A";
$dsn = "Provider=SQLOLEDB;Data Source=$HOST;UserId=$USER;Password=$PASS;Initial Catalog=$DB";
$charPage = CP_UTF8;
$db = new COM("ADODB.Connection", NULL, $charPage);
$db->Open($dsn);
echo "made it";
?>
</body>
</html>