ID: 35857
User updated by: auroraeosrose at gmail dot com
Reported By: auroraeosrose at gmail dot com
-Status: Feedback
+Status: Open
Bug Type: MySQLi related
Operating System: WinXPSP2
PHP Version: 5CVS-2005-12-31 (snap)
New Comment:
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 :)
Previous Comments:
------------------------------------------------------------------------
[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