#45373 [Opn->Fbk]: php crash on query with errors in params
| From: | felipe@php.net | Date: | Sat, 04 Oct 2008 22:54:24 +0000 |
| Subject: | #45373 [Opn->Fbk]: php crash on query with errors in params | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-129464@lists.php.net to get a copy of this message | ||
ID: 45373
Updated by: felipe@php.net
Reported By: max_wer at ukr dot net
-Status: Open
+Status: Feedback
Bug Type: InterBase related
Operating System: Windows XP SP2
PHP Version: 5.2.6
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2008-07-01 09:24:01] max_wer at ukr dot net
I beg pardon. I was, probably, inattentive. SELECT query PHP crash
too.
PHP 5.2.6 FIREBIRD 2.1.0
------------------------------------------------------------------------
[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