php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40277 BLOB objects are fetched badly via prepared statements
Submitted: 2007-01-29 20:20 UTC Modified: 2007-02-06 01:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: zakirov at rain dot ifmo dot ru Assigned:
Status: No Feedback Package: MySQLi related
PHP Version: 5.2.0 OS: FreeBSD, Windows
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: zakirov at rain dot ifmo dot ru
New email:
PHP Version: OS:

 

 [2007-01-29 20:20 UTC] zakirov at rain dot ifmo dot ru
Description:
------------
Data stored in MySQL 4.1 database as LONGBLOB object is fetched badly when prepared statement mechanism is used. Binded result is likely a heap of internal PHP data.

Reproduce code:
---------------
MySQL:

CREATE TABLE Upload (
  ID              INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  Content         LONGBLOB NOT NULL,
  PRIMARY KEY (ID)
) Type=InnoDB CHARACTER SET 'latin1';


PHP:

- store some content (e.g. file) to table Upload

- fetch stored content via prepared statement:
...
$stmt = $conn->prepare('select Content from Upload where ID=?');
$stmt->bind_param('i',$id);
$stmt->execute();
$stmt->bind_result($Content1);
$stmt->fetch();
$stmt->close();
...

- compare stored and fetched content

Expected result:
----------------
Stored content.

Actual result:
--------------
Heap of internal PHP data.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-29 20:35 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2007-02-06 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 11 09:01:28 2024 UTC