php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54343 odbc_execute - Driver does not support this function
Submitted: 2011-03-22 10:54 UTC Modified: 2015-04-11 14:53 UTC
Votes:27
Avg. Score:4.7 ± 0.6
Reproduced:21 of 23 (91.3%)
Same Version:9 (42.9%)
Same OS:7 (33.3%)
From: aw at limbas dot de Assigned: cmb (profile)
Status: Not a bug Package: ODBC related
PHP Version: 5.3.6 OS: linux reh5
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: aw at limbas dot de
New email:
PHP Version: OS:

 

 [2011-03-22 10:54 UTC] aw at limbas dot de
Description:
------------
since php 5.3.5 odbc_execute failed
up to php 5.3.3 it works fine (with same conditions, same database and same odbc-drivers)

Resource id #15
faultCode0faultStringWarning:odbc_execute(): SQL error: [unixODBC][Driver Manager]Driver does not support this function, SQL state IM001 in SQLDescribeParameter

We use 
postgresql 9.0.3, 
psqlODBC 08.03.0200-12.1,
UnixODBC 2.2.12-206.1



Test script:
---------------
$sql_prep = odbc_prepare($db, 'update testtab set testfield = ? where id = 1');
echo $sql_prep;
$rs = odbc_execute($sql_prep, array("dideldidum"));


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-06-14 18:11 UTC] braydenm at povs dot net
I experienced this issue too (with 5.4.29), but the issue will occur with anything newer than 5.3.3.

The root problem's not actually caused by PHP, which threw me because it appeared to work perfectly fine in 5.3.3.

The issue being experienced here is because error handling was added to SQLDescribeParam() (https://github.com/php/php-src/commit/e6bef6735f44c6a44ca3dd633a0a93e9abcdf38f#diff-e7dfa5ff1b47832265dcb9426b0af690R1296); previously none existed, so it assumed all was fine, but in reality, it was still throwing this error. It was just ignored, and somehow managed to continue behaving relatively normally.

In my case, it's rightfully throwing this error because in fact FreeTDS does not support SQLDescribeParam().
 [2015-04-11 14:53 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2015-04-11 14:53 UTC] cmb@php.net
Indeed, the behavior is not a bug in current versions of PHP, but
rather an old bug had been fixed, as explained by braydenm
(thanks!).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 21:01:29 2024 UTC