Bug #68279 [NEW]: ODBC varchar read broken since PHP-5.5.16
| From: | charly dot rohart at rcdevs dot com | Date: | Tue, 21 Oct 2014 14:56:11 +0000 |
| Subject: | Bug #68279 [NEW]: ODBC varchar read broken since PHP-5.5.16 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-188230@lists.php.net to get a copy of this message | ||
From: charly dot rohart at rcdevs dot com
Operating system: Linux 32Bit
PHP version: 5.5.18
Package: ODBC related
Bug Type: Bug
Bug description:ODBC varchar read broken since PHP-5.5.16
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 bug report at https://bugs.php.net/bug.php?id=68279&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68279&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68279&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68279&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68279&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68279&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68279&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68279&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68279&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68279&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68279&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68279&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68279&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68279&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68279&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68279&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68279&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68279&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68279&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68279&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68279&r=mysqlcfg