Bug #68279 [Opn->Fbk]: ODBC varchar read broken since PHP-5.5.16

From: Date: Sat, 11 Apr 2015 17:04:15 +0000
Subject: Bug #68279 [Opn->Fbk]: ODBC varchar read broken since PHP-5.5.16
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191976@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68279&edit=1 ID: 68279 Updated by: cmb@php.net Reported by: charly dot rohart at rcdevs dot com Summary: ODBC varchar read broken since PHP-5.5.16 -Status: Open +Status: Feedback Type: Bug Package: ODBC related Operating System: Linux 32Bit PHP Version: 5.5.18 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: The problem is likely to be related to bug #68087. Please try PHP 5.5.19 or newer. Previous Comments: ------------------------------------------------------------------------ [2014-10-21 14:56:10] charly dot rohart at rcdevs dot com Description: ------------ The recent changes to the odbc extension (introduced since PHP-5.5.16) break odbc queries when reading varchar SQL data. We verified that the problem affects PosgreSQL ODBC Driver. And the issue does not seem to affect the MySQL ODBC Driver from Oracle. When fetching VARCHAR values, the ODBC API returns garbage contents having the right length. The bug does not affect other data type like SQL TEXT or Binary BLOBs. We noticed that reverting the block below (code from PHP 5.5.18) #if defined(ODBCVER) && (ODBCVER >= 0x0300) #define IS_SQL_LONG(x) (x == SQL_LONGVARBINARY || x == SQL_LONGVARCHAR || x == SQL_WLONGVARCHAR) #else #define IS_SQL_LONG(x) (x == SQL_LONGVARBINARY || x == SQL_LONGVARCHAR) #endif back to line below (code from PHP 5.5.15) in php_odbc_includes.h #define IS_SQL_LONG(x) (x == SQL_LONGVARBINARY || x == SQL_LONGVARCHAR) ...resolves the problem. So the very recent changes to php_odbc_includes.h and php_odbc.c have broken something in the ODBC module for Varchar strings. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68279&edit=1

« previous php.bugs (#191976) next »