ID: 46249 User updated by: hswong3i at gmail dot com Reported By: hswong3i at gmail dot com Status: Closed Bug Type: PDO related Operating System: Debian PHP Version: 5.2.6 Assigned To: felipe New Comment:
@felipe: Yes I did. I give a compare with cvs.php.net log message, and check if my PHP package coming with the fix. Fix is already included, #46249 is fixed but than buggy for #46274 as mentioned :S I try both PHP in CLI and Apache2.2. BLOB INSERT/UPDATE are successful in both cases, but fetching NULL and empty string are both buggy... Previous Comments: ------------------------------------------------------------------------ [2008-10-12 16:51:05] [EMAIL PROTECTED] Do you have tried after 13:03:31 2008 UTC? I've commited a complete fix to these issue in this time. Thanks. ------------------------------------------------------------------------ [2008-10-12 16:39:57] hswong3i at gmail dot com I try for both PHP5.2 and 5.3 from http://snaps.php.net/ (they both coming with the fix). They are now able to handle NULL and empty string BLOB INSERT/UPDATE. Thanks for the work. BTW, it is now generate another issue that should belongs to http://bugs.php.net/bug.php?id=46274. Whenever fetching NULL or empty BLOB content from DB apache will crash with Segmentation fault. Maybe we still need some love for that :S ------------------------------------------------------------------------ [2008-10-11 19:05:59] [EMAIL PROTECTED] This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2008-10-11 11:47:35] [EMAIL PROTECTED] Oh sorry, you're right. I can reproduce it. ------------------------------------------------------------------------ [2008-10-11 06:47:47] hswong3i at gmail dot com According to http://www.php.net/manual/en/pdo.lobs.php, using PDO for BLOB INSERT/UPDATE should come with: 1. bindParam/bindColumn 2. PDO::PARAM_LOB 3. stream API, e.g. fopen(), fwrite(), rewind(), etc. You may try to insert other value though you code snippet. The value should also NOT able to insert into PostgreSQL... The bug reproduction code in http://drupal.org/node/316095#comment-1047830 is using pdo_pgsql directly. The db_insert() used is just a fake clone of Drupal CVS HEAD function with simplified programming logic. ------------------------------------------------------------------------ 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/46249 -- Edit this bug report at http://bugs.php.net/?id=46249&edit=1
