ID:               37621
 Updated by:       [EMAIL PROTECTED]
 Reported By:      michal at logix dot cz
-Status:           Assigned
+Status:           Feedback
 Bug Type:         MySQLi related
 Operating System: Linux
 PHP Version:      5.1.4
 Assigned To:      georg
 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:
------------------------------------------------------------------------

[2006-05-29 01:52:26] michal at logix dot cz

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.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=37621&edit=1

Reply via email to