From: sms at inbox dot ru Operating system: Windows 2000 SP4 PHP version: 5.2.4 PHP Bug Type: PDO related Bug description: PDO ODBC: Long binary field in query result crashes PHP ("Out of memory" error)
Description: ------------ With PDO ODBC I can't get long binary data from Microsoft SQL Server (image and varbinary(MAX) fields). PDO->query, PDOStatement->execute() always result in PHP "Out of memory" error, even if output contains no rows. The same queries work fine with ODBC unified extension. Reproduce code: --------------- <?php $dbh=new PDO('odbc:Driver={SQL Server};Server=localhost;Database=test','user','pass'); $dbh->query("select [nbin] from [atts] where [id]=1"); ?> Expected result: ---------------- No PHP fatal errors Actual result: -------------- PHP Fatal error: Out of memory (allocated 262144) (tried to allocate 4294967295 bytes) in D:\Web\test.php on line 3 -- Edit bug report at http://bugs.php.net/?id=42765&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42765&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42765&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42765&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42765&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42765&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42765&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42765&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42765&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42765&r=support Expected behavior: http://bugs.php.net/fix.php?id=42765&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42765&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42765&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42765&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42765&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42765&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42765&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42765&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42765&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42765&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42765&r=mysqlcfg