I receive the following error message when my php file tries to connect to the SQL database. The php file worked fine before the active directory downgrade but since that time I am unable to get it to reconnect. on this server.
I moved the php website to a different server and used the odbc connector to connect into the database. IT works fine. My issue is that the php files cannot connect to the database on the local server.
Warning: odbc_connect(): SQL error: Specified driver could not be loaded due to system error 14001 (SQL Native Client)., SQL state IM003 in SQLConnect in C:\web\emblemListAll.php on line 18
could not connect to dbase
connection code in php file:
if(!($link=odbc_connect("millers","sa","sa"))) die("could not connect to dbase");
$sql = "Select branch, account, dept, comments from comment Order by branch, account, dept";
if(!($result=odbc_do($link, $sql))) die("did not work");
I am running windows server 2003 x64. I have forced IIS and ASP.net both to run in 32bit mode. The rest of the website and PHP files load fine... they are just unable to connect to the database. I have reinstalled IIS and ASP and the MDAC (32bit mode) I have configured the 32bit odbc connector (located in C:\WINDOWS\SysWOW64\odbcad32.exe) with the user and system dsn information. The test completed successfully in the test data source screen. But when the php file tries to connect to the file it still fails with the message located above. I believe this is a permissions issue with the odbc connector link with the sql server 2005 database but am unsure. This same file works just fine when it is implemented on the second server and the odbc is pointed to the same database.
Any thoughts or suggestions?