Insert and select images (BLOB) from DB2 using PHP?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

DOes anybody have a working example of how do make this work?

I've tried everything I could find, Clara patch, many non-working  
examples using pack, baseencode, addslashes, str_replace, bin2hex,  
hex2bin, for read only, using different db2 dataypes blob,clob  
etc.....I'd post code but I've tried too many to list. just an example  
would be excellent.
I've been trying 2 days now.

I know there is a php bug report 25118

If I use the DB2 datatype of clob, I can get the insert to work (at  
least not produce errors), but getting anything useful back out is  
pointless. It seems I can only retrieve 4k of crap (or mabey the insert  
only put 4k there). I can read the thing back to a file and look at it,  
the first 4k of stuff matches what I input (in this case a 26k jpeg  
file), but after that it looks just like random crap including some php  
code (pretty funny), so it appears to be padding the file to the proper  
length with junk.

datatype of blob produces error on the insert no matter what I try

Any working examples out there? Please please...I really could use some  

PS, storing on filesystem and putting pointers in DB is not an option in  
this case.

Site Timeline