ID:               34852
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tim dot tassonis at trivadis dot com
-Status:           Assigned
+Status:           Open
 Bug Type:         ODBC related
 Operating System: Linux
 PHP Version:      5CVS-2005-11-03 (cvs)
 Assigned To:      tony2001


Previous Comments:
------------------------------------------------------------------------

[2005-11-04 01:49:46] [EMAIL PROTECTED]

Tony: Check with Dan Scott before applying this patch; he's probably
most current on this aspect of the odbc extension.


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

[2005-11-03 22:39:22] [EMAIL PROTECTED]

Tony, mr. Kalowsky hasn't had anything to do with PHP for years now.
Just commit the patch. If it breaks something, someone will propably
complain. :)

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

[2005-10-13 13:54:23] [EMAIL PROTECTED]

Dan, please have a look at it.

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

[2005-10-13 13:34:40] tim dot tassonis at trivadis dot com

Well, here is a patch. I dont know whether the formatting is preserved
her properly, it should apply cleanly with "patch -p1 < patchfile" from
whithing the php-5.0.5 directory.

The patch just stops odbc_exec and odbc_prepare from failing if the
SQLSetStmtOption fails. The warning is still displayed in the
error_log. It would be great if this could be applied.

So below follows the patch (created with diff -ruN):

diff -ruN php-5.0.5/ext/odbc/php_odbc.c
php-5.0.5-ora/ext/odbc/php_odbc.c
--- php-5.0.5/ext/odbc/php_odbc.c       2005-07-03 00:50:01.000000000 +0200
+++ php-5.0.5-ora/ext/odbc/php_odbc.c   2005-10-13 12:20:55.000000000
+0200
@@ -875,9 +875,11 @@
                        if (SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE,
SQL_CURSOR_DYNAMIC)
                                == SQL_ERROR) {
                                odbc_sql_error(conn, result->stmt, " 
SQLSetStmtOption");
+                               /* Dont fail, but go on. This can happen 
                                SQLFreeStmt(result->stmt, SQL_DROP);
                                efree(result);
                                RETURN_FALSE;
+                               */
                        }
                }
        } else {
@@ -1296,9 +1298,11 @@
                        if (SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE,
SQL_CURSOR_DYNAMIC)
                                == SQL_ERROR) {
                                odbc_sql_error(conn, result->stmt, " 
SQLSetStmtOption");
+                               /* Dont fail, but go on. This can happen
                                SQLFreeStmt(result->stmt, SQL_DROP);
                                efree(result);
                                RETURN_FALSE;
+                               */
                        }
                }
        } else {

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

[2005-10-13 12:30:49] [EMAIL PROTECTED]

>I can provide a patch to fix it, if that's appreciated.
Of course it is.

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/34852

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

Reply via email to