|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-05-29 17:02 UTC] mike@php.net
[2006-05-30 00:00 UTC] michal at logix dot cz
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 13:00:01 2025 UTC |
Description: ------------ When using MySQLi->bind_param() I noticed it will go out of memory when supplied with wrong arguments, e.g.: $db->bind_param("sss", $param1, $param2); Note there are three 's' but only two parameters. This line never returns in my script and instead the httpd process dies with OOM. Once deleted one of the 's' it plays well again. Using Apache 2.0.58, PHP 5.1.4 and MySQL 4.1.10a on SUSE Linux 9.3/x86. Reproduce code: --------------- $query = "SELECT cookie FROM cookies ". "WHERE username = ? AND sessionid = ? ". "AND expiration > NOW() ORDER BY expiration DESC ". "LIMIT 1"; $stmt = $db->prepare($query); $stmt->bind_param("sss", $username, $sessionid); [...] Expected result: ---------------- Fail gracefully. Actual result: -------------- Goes out of memory, killing httpd thread.