#45373 [Com]: php crash on query with errors in params

From: Date: Tue, 01 Jul 2008 09:24:01 +0000
Subject: #45373 [Com]: php crash on query with errors in params
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-126128@lists.php.net to get a copy of this message
ID: 45373 Comment by: max_wer at ukr dot net Reported By: max_wer at ukr dot net Status: Open Bug Type: InterBase related Operating System: Windows XP SP2 PHP Version: 5.2.6 New Comment: I beg pardon. I was, probably, inattentive. SELECT query PHP crash too. PHP 5.2.6 FIREBIRD 2.1.0 Previous Comments: ------------------------------------------------------------------------ [2008-07-01 06:27:30] lester at lsces dot co dot uk I can confirm this is happening, but I also get a crash with the select rather than just update. Unable to modify the SQL 'NOT' to give a crash - which is what I would probably expect since only the number of parameters matter not how they are used. Firebird 2.0 and PHP5.2.5 ------------------------------------------------------------------------ [2008-06-27 06:36:26] max_wer at ukr dot net Description: ------------ php crash where count(params in ibase_execute()) > count(params in SQL-string) and query-type is not SELECT Reproduce code: --------------- $db = ibase_connect('127.0.0.1:employee','sysdba','masterkey'); $sql = "update country set currency = ? where country = ? returning country, currency";/**/ /*"select * from country where country = ? and currency = ?"; /**/ $t = ibase_trans(IBASE_WRITE); $q = ibase_prepare($db,$t,$sql); $r = ibase_execute($q,'USA','Dollar'/*!!!With three param SELECT-OK UPDATE-CRASH*/ ,0/**/); ibase_rollback($t); ibase_close($db); Expected result: ---------------- must be error message ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45373&edit=1

« previous php.bugs (#126128) next »