php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68279 ODBC varchar read broken since PHP-5.5.16
Submitted: 2014-10-21 14:56 UTC Modified: 2015-04-19 04:22 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: charly dot rohart at rcdevs dot com Assigned: cmb (profile)
Status: No Feedback Package: ODBC related
PHP Version: 5.5.18 OS: Linux 32Bit
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: charly dot rohart at rcdevs dot com
New email:
PHP Version: OS:

 

 [2014-10-21 14:56 UTC] 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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-11 17:04 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2015-04-11 17:04 UTC] cmb@php.net
The problem is likely to be related to bug #68087. Please try PHP
5.5.19 or newer.
 [2015-04-19 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 19:01:29 2024 UTC