#35857 [Com]: Crash using mysqli_stmt_fetch

From: Date: Sat, 31 Dec 2005 03:20:27 +0000
Subject: #35857 [Com]: Crash using mysqli_stmt_fetch
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-91293@lists.php.net to get a copy of this message
ID: 35857 Comment by: judas dot iscariote at gmail dot com Reported By: auroraeosrose at gmail dot com Status: Feedback Bug Type: MySQLi related Operating System: WinXPSP2 PHP Version: 5CVS-2005-12-31 (snap) New Comment: not reproducible in Linux amd64 $php mysqli.php int(1) php -v PHP 5.1.2RC2-dev (cli) (built: Dec 29 2005 14:53:40) Previous Comments: ------------------------------------------------------------------------ [2005-12-31 03:38:43] sniper@php.net Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. ------------------------------------------------------------------------ [2005-12-31 03:25:29] auroraeosrose at gmail dot com still happens - "Apache HTTP Server has encountered a problem and needs to close. We are sorry for the inconvenience." phpinfo says-> Build Date Dec 31 2005 00:19:15 don't think I can get any newer than that :) ------------------------------------------------------------------------ [2005-12-31 02:10:55] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip ------------------------------------------------------------------------ [2005-12-31 02:09:32] auroraeosrose at gmail dot com 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 this bug report at http://bugs.php.net/?id=35857&edit=1

« previous php.bugs (#91293) next »