From: php at jschreiber dot com Operating system: GNU/Linux (Gentoo) PHP version: 4.3.2 PHP Bug Type: ODBC related Bug description: can't store data in blob fields
Description: ------------ I have a problem concerning BLOB fields and DB/2 V8.1.2. When I try to store a file with odbc_prepare() and odbc_execute($stmt, $params) no error code is returned, but the BLOB contains an empty value ("x''", not a NULL value). I had this bug since I upgraded from DB/2 7.1 to DB/2 8.1 (and DB/2 8.1.2 as well). It's not a programming error--all script were working with DB/2 7.1. It even occurs with the odbc-test included in tests/ directory of the php source distribution. I tried all tricks mentioned at http://www7b.software.ibm.com/dmdd/library/techarticle/0301liu/0301liu.html but without success. Reproduce code: --------------- odbc-t5.php from the tests/ directory of the php source distribution. Expected result: ---------------- Actual result: -------------- This is the output: --- snip --- ODBC Test 5 - Blobs Connecting to test as db2inst1 - OK Dropping table "php_test" - OK Creating table "php_test": - OK Table Info: Name Type Length ID CHAR 32 GIF BLOB 100000 Inserting data: /tmp/phpnyprAM - - - OK --- snap --- It looks like everythings works fine, but the the database contains just "image1" and "x''". -- Edit bug report at http://bugs.php.net/?id=25118&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25118&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25118&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25118&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25118&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25118&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25118&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25118&r=support Expected behavior: http://bugs.php.net/fix.php?id=25118&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25118&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25118&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25118&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25118&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25118&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25118&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25118&r=gnused