470,630 Members | 2,003 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,630 developers. It's quick & easy.

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

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 http://bugs.php.net/bug.php?id=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.
Feb 21 '06 #1
0 2171

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Ole Hansen | last post: by
11 posts views Thread by Chris Fink | last post: by
2 posts views Thread by Luis Mendes | last post: by
7 posts views Thread by Kevin Lawrence | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.