ID: 40277 Updated by: [EMAIL PROTECTED] Reported By: zakirov at rain dot ifmo dot ru -Status: Open +Status: Feedback Bug Type: MySQLi related Operating System: FreeBSD, Windows PHP Version: 5.2.0 New Comment:
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 Previous Comments: ------------------------------------------------------------------------ [2007-01-29 20:20:04] 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40277&edit=1