Bug #67627 [Opn]: odbc_execute(): Not enough parameters, but there are

From: Date: Wed, 13 Aug 2014 15:52:07 +0000
Subject: Bug #67627 [Opn]: odbc_execute(): Not enough parameters, but there are
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187101@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67627&edit=1

 ID:                 67627
 User updated by:    sean dot harris at nordstrom dot com
 Reported by:        sean dot harris at nordstrom dot com
 Summary:            odbc_execute(): Not enough parameters, but there are
 Status:             Open
 Type:               Bug
 Package:            ODBC related
 Operating System:   Mac OS 10.9
 PHP Version:        5.5.14
 Block user comment: N
 Private report:     N

 New Comment:

I contacted the makers of the ODBC driver and they claim this is not a bug with their driver but a
bug within PHP


Previous Comments:
------------------------------------------------------------------------
[2014-07-15 19:51:45] sean dot harris at nordstrom dot com

Description:
------------
We have been experiencing a strange and random bug. We only begun to notice it since we just started
using PHP’s ODBC prepared statements.

2 - 6 times out of a 1000 we will receive the following php warning:
Warning: odbc_execute(): Not enough parameters (2 should be 3)


We made a test script running the exact same query 1000 times. The last loop I ran the following
iterations threw the error:
130, 312, 340

Our current workaround is to throw a couple nulls at the end of the parameter array.

We are using 'Actual SQL Server' ODBC driver if that matters.

Test script:
---------------
//db connection stuff would be here

for ($i=0; $i < 1000; $i++) { 
	$sql = 'SELECT * FROM tags WHERE fk_userTagged = ? AND tagsID > ?';
	$statement = odbc_prepare($dbc,$sql);
	odbc_execute($statement,[638,5]);
	echo "$i<br/>";
}

Actual result:
--------------
Warning: odbc_execute(): Not enough parameters (2 should be 3)


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



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


Thread (4 messages)

« previous php.bugs (#187101) next »