|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-01-28 16:57 UTC] Matt dot hintze at nana dot com
PHP cannot find a valid ODBC datasource. Even though the DSN has been verified and connected to with other products like MS access. The DSN points to a SQL Server database. To complicate matters, PHP can see a DSN that was previously created on for the same SQL server instance. But when trying to create any new DSN, PHP cannot see it. This app was run on my local win2k pro box and worked fine. When I moved it to my Win2k server, it cannot fins the ODBC DSN. I see other bug posts that have had the same problem, yet reponses say that it is not a bug.
Line 10 >
$connect_TI = odbc_connect("ti_readonly","TI_readonly","TI_readonly");
Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in c:\inetpub\wwwroot\survey\survey.php on line 10
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 22:00:02 2025 UTC |
Is "ti_readonly" a userDSN or a systemDSN? Run this EXACT script from the COMMAND LINE on your server and report the output: <?php var_dump(odbc_connect("ti_readonly","TI_readonly","TI_readonly")); ?>I have the exact same problem. Running: MS Server 2008 R2 SQL Server 2008 IIS7 PHP 5.3.3 I set up a system DSN using the SQL Server driver, TCP\IP dynamic port. When I run the SQL Server Data Source Test, I get the following result: Microsoft SQL Server ODBC Driver Version 06.00.6002 ... ... Test Completed successfully! When I check my php-errors.log I find: IM002 when attempting an odbc_connect. Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified... This script works on another server without any problems. I doubt this is a php issue, but would be interested in any MS centric solutiions.