Bug #73191 [Asn->Nab]: "SQLColAttribute can't handle SQL_DESC_OCTET_LENGTH" with Foxpro

From: Date: Wed, 28 Sep 2016 19:04:56 +0000
Subject: Bug #73191 [Asn->Nab]: "SQLColAttribute can't handle SQL_DESC_OCTET_LENGTH" with Foxpro
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204326@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73191&edit=1 ID: 73191 Updated by: ab@php.net Reported by: eion at robbmob dot com Summary: "SQLColAttribute can't handle SQL_DESC_OCTET_LENGTH" with Foxpro -Status: Assigned +Status: Not a bug Type: Bug Package: ODBC related Operating System: Windows PHP Version: 7.0.11 Assigned To: ab Block user comment: N Private report: N New Comment: Thanks for checking, Christoph. Yeah, it looks like not a PHP issue. Our default builds are ODBC 3.0 by default, while some parts still maintain BC workarounds. The error S1091 witnesses that the driver is ODBC 2.x. Besides that, the technology seems to be not supported anymore - the support for the last FoxPro 9.0 product was discontinued over a year ago, and there are no new versions. @eion, an option for you were to compile the required ext/odbc variant while setting --with-odbcver to like 0x0250 or other that is suitable for your app. The warning itself is useful as the actual reason adding it was about drivers that have inconsistent ODBC 3.x implementation. Thanks. Previous Comments: ------------------------------------------------------------------------ [2016-09-28 16:00:03] cmb@php.net That appears to be a bug in the Microsoft ODBC Visual FoxPro driver (BTW, which version do you use?) Apparently, the driver claims ODBC 3.0 compatibility, but doesn't know about SQL_DESC_OCTET_LENGTH. Not sure if we should do something here, besides reporting the issue to Microsoft. Anatol, what do you think? ------------------------------------------------------------------------ [2016-09-28 06:43:06] eion at robbmob dot com Description: ------------ Every query with odbc_exec() that returns a string is outputting a PHP Warning of "SQLColAttribute can't handle SQL_DESC_OCTET_LENGTH" when using the Foxpro driver. The full error is [28-Sep-2016 19:15:10 Pacific/Auckland] PHP Warning: odbc_exec(): SQLColAttribute can't handle SQL_DESC_OCTET_LENGTH: [S1091] [Microsoft][ODBC Visual FoxPro Driver]Descriptor type out of range in test.php on line 2 Looking at https://github.com/php/php-src/blob/master/ext/odbc/php_odbc.c#L1018 php_error_docref(NULL, E_WARNING, "SQLColAttribute can't handle SQL_DESC_OCTET_LENGTH: [%s] %s", state, errtxt); It appears that this warning should actually be a notice, or have some way of blocking this message. This warning was added in http://git.php.net/?p=php-src.git;a=commit;h=268eb1999b1598a2a1a875c5f0172d5b615811ac Test script: --------------- <?php $a = odbc_connect('Foxpro', '', ''); odbc_exec($a, "SELECT foo FROM bar"); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73191&edit=1

« previous php.bugs (#204326) next »