#49546 [Opn->Csd]: DFSDFD
| From: | kalle@php.net | Date: | Mon, 14 Sep 2009 07:11:41 +0000 |
| Subject: | #49546 [Opn->Csd]: DFSDFD | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-142318@lists.php.net to get a copy of this message | ||
ID: 49546
Updated by: kalle@php.net
Reported By: gezine at hotmail dot com
-Status: Open
+Status: Closed
Bug Type: IIS related
Operating System: Windows
PHP Version: 5.3.0
Previous Comments:
------------------------------------------------------------------------
[2009-09-13 18:53:48] gezine at hotmail dot com
Description:
------------
Locally on my computer my connection to the database works fine but the
moment I upload my file to the web server, and submit a form I receive
the error.
Webserver Information
-----------------------
Operating System: Windows
PHP Version: PHP 5.x IIS
Version: IIS 7.0
code tried but no luck
----------------------
http://us3.php.net/manual/en/function.odbc-connect.php
Reproduce code:
---------------
function connect_to_database($dsn, $user, $password)
{
//create a connection to the database
$conn = odbc_connect($dsn, $user, password,SQL_CUR_USE_DRIVER);
//if the connection failed display the appropriate message
if(!$conn)
{
output_error();
die();
}//end if(_);
else
{
//return connection has been established.
return $conn;
}//end else
}//end connect_to_database(_);
Expected result:
----------------
I expected a successful return since every thing on the
webserver(Godaddy) is setup correctly according to their test.
Actual result:
--------------
"Warning: odbc_connect() [function.odbc-connect]: SQL error:
[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified, SQL state IM002 in SQLConnect in "
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49546&edit=1