The page you gave me didnt help but thanks anyway :)

We solved the problem which was dizzing us for days by using the silly
command

pack("H*", $image)

!!

Dimitris



"Ben Bleything" <[EMAIL PROTECTED]> wrote in message
000001c10ae1$30a03690$0201a8c0@c1141975c">news:000001c10ae1$30a03690$0201a8c0@c1141975c...
> Check out http://www.phpbuilder.com/columns/florian19991014.php3.  It
> deals with MySQL, but the concepts should be the same... it sounds like
> there are some steps about handling the binary data in a binary-safe
> fashion that are getting left out.
>
> Good luck,
> Ben
>
> -----Original Message-----
> From: a [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 12, 2001 2:33 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Hello
>
> Hello
>
> I have an ibm db2 which has jpg images stored as blob fields (about 2M).
> I
> seem to have a hard time getting them with PHP and presenting them
> properly
> in the browser. (When I try to save it from the DB2 side, it is stored
> ok).
>
> Though i actually get the image i ask for, when i try to output it to
> the
> browser i get a series of characters from 0 to F instead (Hex) like
> this:
>
> FFD8FFFE000857414E473202FFE000104A46494600010101025802580000FFDB0
>
> Saving it to a file with has no result either. The file seems to be
> created,
> it has the appropriate size but trying to view is contents results in
> getting an unsupported type of image which the browser fails to present.
>
> Using the different types of the odbc_binmode function of PHP
> (http://www.php.net/manual/en/function.odbc-binmode.php), returns the
> same
> results. I try odbc_longreadlen since i get a blob field but the output
> is
> similar to the previous.
>
> I also asked in a DB2 newsgroup
> http://groups.google.com/groups?hl=el&safe=off&ic=1&th=17ccf5cbc4d0762c,
> 4&se
> ekm=5261b6a0.0107090324.6ab27060%40.
>
> Thats why we added a field containing a JPEG format of the image but it
> doesnt seem to work either.
>
>
> Thanks in advance.
>
> Dimitris Glezos
>
>
> High Performance Computing Laboratory
> University of Patras
>
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to