From: tim dot tassonis at trivadis dot com Operating system: Linux PHP version: 5.0.5 PHP Bug Type: ODBC related Bug description: Failure in odbc_exec() using oracle-supplied odbc driver
Description: ------------ When using the oracle-supplied ODBC Driver under Linux, any odbc_exec() call fails with: [unixODBC][Driver Manager]Driver does not support this function The log files is a bit more verbose: [unixODBC][Driver Manager]Driver does not support this function, SQL state IM001 in SQLSetStmtOption The offending code is in odbc_prepare(line 875) and odbc_exec (line 1276), when the module tries to set SQL_CURSOR_DYNAMIC via SQLSetStmtOption, which returns an error using the oracle driver. The error goes away if I undefine HAVE_SQL_EXTENDED_FETCH, so the statements will not be reached. Would it be possible to only issue a notice when this command fails and proceed with processing. I can provide a patch to fix it, if that's appreciated. Reproduce code: --------------- $dsn="ANY_ORACLE_DSN"; $uid="ANY_VALID_USERID"; $pwd="ANY_VALID_PASSWORD"; $conn = odbc_connect ( $dsn, $uid, $pwd ); /* The connect succeeds */ if (!$conn) { printf("Error connecting to $database.<br>\n"); return; } /* The exec will fail with the decribed error */ $cursor = odbc_exec($conn,"SELECT tname from tab"); if (!$cursor) { printf("Failure in odbc_exe:<br>\n"); printf("%s<br>\n",htmlentities(odbc_errormsg($conn))); return; } Actual result: -------------- [unixODBC][Driver Manager]Driver does not support this function, SQL state IM001 in SQLSetStmtOption -- Edit bug report at http://bugs.php.net/?id=34852&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34852&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34852&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34852&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34852&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34852&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34852&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34852&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34852&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34852&r=support Expected behavior: http://bugs.php.net/fix.php?id=34852&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34852&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34852&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34852&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34852&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34852&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34852&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34852&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34852&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34852&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34852&r=mysqlcfg