php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25510 How to get Blob in informix
Submitted: 2003-09-12 05:38 UTC Modified: 2003-09-22 06:46 UTC
From: tqnam at pmail dot vnn dot vn Assigned:
Status: No Feedback Package: Informix related
PHP Version: 4.3.3 OS: windows 2000
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tqnam at pmail dot vnn dot vn
New email:
PHP Version: OS:

 

 [2003-09-12 05:38 UTC] tqnam at pmail dot vnn dot vn
Description:
------------
I insert a blob value into table, but when i get blob value it is erro, please help me get it.

Reproduce code:
---------------
// the code insert blob value
$query="insert into blobimage(pit_id,pit_image) values(5,FILETOBLOB('".$pathfile."','server'))";
$stmt=ifx_query($query,$con);
if(!$stmt){print("errors");}
ifx_free_result($stmt);
ifx_close($con);

// The code I get blob value
$query="select pit_image from blobimage where pit_id=5";
ifx_blobinfile_mode(1); 
$stmt=ifx_query($query,$con);
if(!$stmt){print("errors");}
$row=ifx_fetch_row($stmt);
$content=ifx_get_blob($row["pit_image"]);
ifx_free_result($stmt);
ifx_close($con);



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-16 10:23 UTC] sniper@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 [2003-09-16 23:24 UTC] tqnam at pmail dot vnn dot vn
I used PHP4.3.3, Webserver ISS.
I used code follow to insert Blob value in too table
        $query="insert into blobimage(pit_id,pit_image)
        values(5,FILETOBLOB('".$pathfile."','server'))";
        $stmt=ifx_query($query,$con);
        if(!$stmt){print("errors");}
        ifx_free_result($stmt);
        ifx_close($con);

But when I get Blob value by the code
      $query="select pit_image from blobimage ";
      ifx_blobinfile_mode(0); 
      ifx_nullformat(1);
      $stmt=ifx_query($query,$con);
      if(!$stmt){print("errors");}
      $row=ifx_fetch_row($stmt);
      $content=ifx_get_blob($row["pit_image"]);
      ifx_free_blob($row["pit_image"]);
      ifx_free_result($stmt);
      ifx_close($con);

PHP show error massege "The instruction at "0x250075f0" preferenced memory at "0x0000000".
The memory could not read".
 [2003-09-17 01:17 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

2 informix bugs were fixed since 4.3.3 was released.

 [2003-09-22 06:46 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 11:01:30 2024 UTC