By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,665 Members | 1,952 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,665 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.
Feb 21 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.