ID: 14803
Updated by: kalowsky
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: ODBC related
Operating System: Sybase ODBC (QNX and Win2k)
PHP Version: 4.1.1
New Comment:

as soon as my CVS finishes its connect, this should be done.


Previous Comments:
------------------------------------------------------------------------

[2002-01-02 12:18:10] [EMAIL PROTECTED]

This bug appears to have been in the code for several versions -
definitely 4.0.5 through 4.1.1. In the odbc_cursor function (defined in
ext/odbc/php_odbc.c), the call to SQLGetInfo (lines 1057-1058 in
version 4.1.1 source code) uses a zero as the fourth parameter. This
causes odbc_cursor to incorrectly return an empty cursor name, '' (when
using different versions of Sybase SQL Anywhere under both QNX and
Windows 2000).

The "bug" looks like it is more in the Sybase implementation of the
ODBC SQLGetInfo documentation. According to the ODBC documentation, the
fourth parameter is supposed to be ignored when the second parameter is
set to an int type such as SQL_MAX_CURSOR_NAME_LEN.

The fix/workaround is to change the fourth parameter to:

  sizeof(max_len)

Can this fix be implemented in the base PHP code so that it works with
the widest selection of ODBC drivers? Correct implementations should
ignore this value. Thanks.

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=14803&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to