#35857 [NEW]: Crash using mysqli_stmt_fetch
From: auroraeosrose at gmail dot com
Operating system: WinXPSP2
PHP version: 5CVS-2005-12-31 (snap)
PHP Bug Type: MySQLi related
Bug description: Crash using mysqli_stmt_fetch
Description:
------------
Using mysqli_stmt_fetch or $stmt->fetch crashes apache/php
Broken with both mysql 5.0 and 4.1
Reproduce code:
---------------
$mysqli = mysqli_connect("localhost", "root", "password",
"db");
$mysqli->query("CREATE TABLE IF NOT EXISTS temp (id INT NOT NULL)");
$mysqli->query("INSERT INTO temp (id) VALUES
(1),(2),(3),(4)");
$stmt = $mysqli->prepare("SELECT id FROM temp");
$stmt->execute();
$stmt->bind_result($id);
$stmt->fetch();
var_dump($id);
$stmt->close();
$mysqli->query("DROP TABLE temp");
$mysqli->close();
Expected result:
----------------
1
Actual result:
--------------
Apache/php go boom - I'd send a backtrace but until I get nice "I'm on
windows and don't do C" directions that's not going to happen
I have the annoying windows dump files if they're even useful
trying the same thing procedural style does the same thing - through
commenting out trial and error the actual crash occurs on the
$stmt->fetch() line
--
Edit bug report at http://bugs.php.net/?id=35857&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35857&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35857&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35857&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=35857&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35857&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35857&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35857&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35857&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35857&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35857&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35857&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35857&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35857&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35857&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35857&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35857&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35857&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35857&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35857&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35857&r=mysqlcfg
Thread (17 messages)
- auroraeosrose at gmail dot com
- sniper@php.net#35857 [Opn->Fbk]: Crash using mysqli_stmt_fetch
- auroraeosrose at gmail dot com#35857 [Fbk->Opn]: Crash using mysqli_stmt_fetch
- sniper@php.net#35857 [Opn->Fbk]: Crash using mysqli_stmt_fetch
- judas dot iscariote at gmail dot com#35857 [Com]: Crash using mysqli_stmt_fetch
- auroraeosrose at gmail dot com#35857 [Fbk->Opn]: Crash using mysqli_stmt_fetch
- tony2001@php.net#35857 [Opn->Asn]: Crash using mysqli_stmt_fetch
- andrey@php.net#35857 [Asn->Fbk]: Crash using mysqli_stmt_fetch
- andrey@php.net#35857 [Fbk]: Crash using mysqli_stmt_fetch
- auroraeosrose at gmail dot com#35857 [Fbk->Opn]: Crash using mysqli_stmt_fetch
- sniper@php.net#35857 [Opn->Fbk]: Crash using mysqli_stmt_fetch
- auroraeosrose at gmail dot com#35857 [Fbk->Opn]: Crash using mysqli_stmt_fetch
- sniper@php.net#35857 [Opn->Asn]: Crash using mysqli_stmt_fetch
- georg@php.net#35857 [Asn->Fbk]: Crash using mysqli_stmt_fetch
- auroraeosrose at gmail dot com#35857 [Fbk->Opn]: Crash using mysqli_stmt_fetch
- sniper@php.net#35857 [Opn->Asn]: Crash using mysqli_stmt_fetch
- georg@php.net#35857 [Asn->Bgs]: Crash using mysqli_stmt_fetch