Connecting Tech Pros Worldwide Help | Site Map

PHI Interbase or Firebird database

UnixUser
Guest
 
Posts: n/a
#1: Jul 17 '05
I am using the PHP 4.3.4 with a standard (unmodified ) php.ini file.
I am tryong to output a blob field that contains a jpeg image using
the ibase_blob_echo( row[3]) function. The blob field is the 4th
element of my select statement. when I run this through the browser I
get "Warning: ibase_blob_echo(): Invalid blob id in
/wwwroot/htdocs/hello.php" Has anyone seen this error and what can I
do to resolve this?
Randell D.
Guest
 
Posts: n/a
#2: Jul 17 '05

re: PHI Interbase or Firebird database


UnixUser wrote:[color=blue]
> I am using the PHP 4.3.4 with a standard (unmodified ) php.ini file.
> I am tryong to output a blob field that contains a jpeg image using
> the ibase_blob_echo( row[3]) function. The blob field is the 4th
> element of my select statement. when I run this through the browser I
> get "Warning: ibase_blob_echo(): Invalid blob id in
> /wwwroot/htdocs/hello.php" Has anyone seen this error and what can I
> do to resolve this?[/color]

I've never displayed images from the database but I suggest:

1. Are you reading the field (column) by number, or by name - I'm
wondering if you've selected the wrong column. If not, I suggest
reading by column name anyway incase you ever perform an insert it might
send things out of sync.

2. I *believe* (ie I'm not sure) but I think you have to send headers
with the data of your image so the browser knows what you want to do...
Secondly, how are you trying to display the image, is it the result of a
<img src=/hello.php> or some other method.

Failing the above...

3. If the hello.php script isn't too long - share it here as it might
help provide a solution faster.


Hope the above gives you food for thought,
laters
randelld
UnixUser
Guest
 
Posts: n/a
#3: Jul 17 '05

re: PHI Interbase or Firebird database


"Randell D." <please.post.and.share@news.group.com> wrote in message news:<zkhub.420105$pl3.314924@pd7tw3no>...[color=blue]
> UnixUser wrote:[color=green]
> > I am using the PHP 4.3.4 with a standard (unmodified ) php.ini file.
> > I am tryong to output a blob field that contains a jpeg image using
> > the ibase_blob_echo( row[3]) function. The blob field is the 4th
> > element of my select statement. when I run this through the browser I
> > get "Warning: ibase_blob_echo(): Invalid blob id in
> > /wwwroot/htdocs/hello.php" Has anyone seen this error and what can I
> > do to resolve this?[/color]
>
> I've never displayed images from the database but I suggest:
>
> 1. Are you reading the field (column) by number, or by name - I'm
> wondering if you've selected the wrong column. If not, I suggest
> reading by column name anyway incase you ever perform an insert it might
> send things out of sync.
>
> 2. I *believe* (ie I'm not sure) but I think you have to send headers
> with the data of your image so the browser knows what you want to do...
> Secondly, how are you trying to display the image, is it the result of a
> <img src=/hello.php> or some other method.
>
> Failing the above...
>
> 3. If the hello.php script isn't too long - share it here as it might
> help provide a solution faster.
>
>
> Hope the above gives you food for thought,
> laters
> randelld[/color]

I can display the image now from the database, however, I had to
create another scriptfile and requery the database from within that
file. Is there a way to pass the image as a parameter to the
hello.php scriptfile or the row[3] parameter so that I don't have to
requery or reopen the table?
Closed Thread