Edit report at http://bugs.php.net/bug.php?id=40913&edit=1
ID: 40913 Comment by: samuel at ingessons dot se Reported by: dennis at inmarket dot lviv dot ua Summary: PDO::PARAM_LOB does not bind to a stream for fetching a BLOB Status: Verified Type: Bug Package: PDO related Operating System: Win XP PHP Version: 5.2.6 Assigned To: wez Block user comment: N New Comment: And another reason why I need a stream and not a string is that a string would consume all the memory for a large object. Previous Comments: ------------------------------------------------------------------------ [2010-10-05 17:23:46] samuel at ingessons dot se The reason why I want to have a stream and not echo it directly is that I use a function that should return a stream. ------------------------------------------------------------------------ [2010-10-05 17:14:27] samuel at ingessons dot se Is there a way to solve the problem and get a stream? I want to make a pipeline directly from a longblob to the client. ------------------------------------------------------------------------ [2010-08-24 11:22:11] david at futuresbright dot com I have experienced the same issue with Windows 2003 using SQL Server 9.0 and php 5.2.13. Really disappointing that this bug can have been around for so many years without being fixed. ------------------------------------------------------------------------ [2010-02-19 21:02:32] jcook at macmillanmarketing dot com I've just been able to reproduce this bug today running PHP 5.3.1 on Windows. Reproduce Code: $db = db::getConn(); $st = $db->prepare($sql); $st->execute(array(':id' => $id)); $st->bindColumn(1, $image, PDO::PARAM_LOB); $st->fetch(PDO::FETCH_BOUND); header ('Content-type: image/jpeg'); fpassthru($image);// this call fails with 'supplied argument is not a valid stream resource' Expected result: Resource Actual result: string I can work around this error for what I'm trying to do but it would be nice if this was fixed. ------------------------------------------------------------------------ [2009-07-27 15:12:53] ralph dot reckert at web dot de That error still does not seem to be solved in the current PHP version 5.3.0 nor in 5.2.10. At least it is not listed in the ChangeLog list of fixed bugs of that versions. It would be nice if, four years after PDO was released and almost two and a half years after that bug was first reported, someone could try to fix it, really test that fix and make shure it finds it's way into some release version of PHP. Until then, in my opinion the status of this bug report should be OPEN! Best regards, Ralph ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=40913 -- Edit this bug report at http://bugs.php.net/bug.php?id=40913&edit=1