|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56991 Insertion of Large CLOB/BLOB Fails
Submitted: 2006-04-28 11:57 UTC Modified: 2017-01-29 04:22 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: kfbombar at us dot ibm dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 5_1 CVS-2006-04-28 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
43 - 12 = ?
Subscribe to this entry?

 [2006-04-28 11:57 UTC] kfbombar at us dot ibm dot com
The insertion of a large CLOB or BLOB file (>300K) into DB2 will not work correctly through PDO_ODBC.  The entire file is not uploaded to the database.

Reproduce code:

$db = new PDO('odbc:db2node', 'db2inst1', 'db2pass');

$db->exec( "DROP TABLE odbctest" );
$db->exec( "CREATE TABLE odbctest (large clob)" );

$fp = fopen('/home/user/largefile.txt', 'r');

$stmt = $db->prepare('INSERT INTO odbctest (large) values (?)');

$stmt->bindParam( 1, $fp, PDO::PARAM_LOB );


Expected result:
The database should have the correct data inserted into it.

Actual result:
Only partial data is inserted into DB2.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-29 21:45 UTC]
How much data gets inserted?
What information do you see if you add:
after you create the database connection?
 [2006-05-01 10:20 UTC] kfbombar at us dot ibm dot com
The file that is getting inserted is about 351 KB.
There is nothing different seen with adding:


The database still does not have all of the correct information from the file.
 [2017-01-20 20:52 UTC]
-Status: Open +Status: Feedback -Package: PDO_ODBC +Package: *General Issues
 [2017-01-20 20:52 UTC]
Is this still relevant?
 [2017-01-29 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Sep 29 13:05:52 2022 UTC