php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20086 SQLDriverConnect supported by win32
Submitted: 2002-10-25 09:45 UTC Modified: 2002-10-31 11:22 UTC
From: john at johnandlouise dot com Assigned:
Status: Closed Package: ODBC related
PHP Version: 4CVS-2002-10-25 OS: W2K
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: john at johnandlouise dot com
New email:
PHP Version: OS:

 

 [2002-10-25 09:45 UTC] john at johnandlouise dot com
In ext/odbc/php_odbc.php dsn-less connections are only supported for empress and unixodbc. Windows also supports this connection method.

Changing the line:
#if defined(HAVE_EMPRESS) || defined(HAVE_UNIXODBC)

to:
#if defined(HAVE_EMPRESS) || defined(HAVE_UNIXODBC) || defined(WIN32)

enables dsn-less connections under windows.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-27 19:46 UTC] kalowsky@php.net
Unified diffs are your and my friends.  Can you please provide one!
 [2002-10-28 11:38 UTC] john at johnandlouise dot com
diff is now my new friend. Is this right? :-)

2110c2110
< #if defined(HAVE_EMPRESS) || defined(HAVE_UNIXODBC)
---
> #if defined(HAVE_EMPRESS) || defined(HAVE_UNIXODBC) || defined(PHP_WIN32)
2133c2133
< 			rc = SQLDriverConnect((*conn)->hdbc, NULL, ldb, strlen(ldb), dsnbuf, 300,
---
> 			rc = SQLDriverConnect((*conn)->hdbc, NULL, ldb, (short)strlen(ldb), dsnbuf, 300,

The (short) typecast is to prevent a warning in win32 - don't know if it will have issues with other platforms. Now using PHP_WIN32 not WIN32 for consistency with other code.
 [2002-10-30 20:57 UTC] kalowsky@php.net
PHP is now your DSN-less friend.  Please test a snapshot and make sure this is working properly for you.
 [2002-10-31 11:22 UTC] john at johnandlouise dot com
Snapshot tested OK - thanks

John
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 27 06:01:31 2024 UTC