Windows + ZendServer + Pdo_Odbc + 260 char field = query failure

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Windows + ZendServer + Pdo_Odbc + 260 char field = query failure

mcouillard
This post has NOT been accepted by the mailing list yet.
This post was updated on .
Update! The upgrade to Zend Server 6 release solved it. Zend customer support recommended this shortly before v6 final was released.

--


Simple queries fail with a 'crash' / no response if the data contains more than 259 characters in a single field. It happens on different tables on different DB machines. There is no error nor log; the page simply fails to return and the browser pops an open/saveas dialog.

The queries work fine if I fetch left(x,259) or right(x,259) on the 'offending' fields.

Webserver: ZendServer 5.6 and 6 beta (CE and full)
It works fine using the same PHP exe & ODBC on IIS (same webserver; same code).

DB machines affected: MySQL or iSeries DB2

DB tables: Any table with a character field larger than 259 plus data that's actually longer than 259 characters. Both DDS and SQL tables on the iSeries; InnoDB on MySQL.

Driver: Pdo_Odbc
A driver of mysqli works fine. Same with pure odbc_* commands.

Framework: ZF 2.0.2 and 2.0.5
I created test pages both within my large ZF2 app and outside of it (created page next to public/index.php).

Code:
$db = new \Zend\Db\Adapter\Adapter(array(
 'dsn' => 'odbc:odbc_conn_name',
 'driver' => 'Pdo_Odbc'
));
$result = $db->query($sql);
$a = $result->toArray(); //failure! same with foreach($results as $row){}


This is mind-boggling! Anyone ever seen this? I've also opened an official Zend support ticket.
--
Michael :: B2B Web Application Developer