|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67627 odbc_execute(): Not enough parameters, but there are
Submitted: 2014-07-15 19:51 UTC Modified: 2020-10-18 04:22 UTC
Avg. Score:3.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:2 (100.0%)
From: sean dot harris at nordstrom dot com Assigned: cmb (profile)
Status: No Feedback Package: ODBC related
PHP Version: 5.5.14 OS: Mac OS 10.9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: sean dot harris at nordstrom dot com
New email:
PHP Version: OS:


 [2014-07-15 19:51 UTC] sean dot harris at nordstrom dot com
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);
	echo "$i<br/>";

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-08-13 15:52 UTC] sean dot harris at nordstrom dot com
I contacted the makers of the ODBC driver and they claim this is not a bug with their driver but a bug within PHP
 [2020-10-05 10:19 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-10-05 10:19 UTC]
Can you still reproduce this with any of the actively supported
PHP versions[1]?

[1] <>
 [2020-10-18 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 18 11:01:29 2024 UTC