Edit report at https://bugs.php.net/bug.php?id=63258&edit=1
ID: 63258 Comment by: f dot marquis at of2m dot fr Reported by: paul dot visco at roswellpark dot org Summary: seg fault with PDO and dblib using DBSETOPT(H->link, DBQUOTEDIDENT, 1); Status: Closed Type: Bug Package: PDO related Operating System: centos 5.8 PHP Version: 5.4.7 Assigned To: ssufficool Block user comment: N Private report: N New Comment: this patch seems to cause an error : #63638 Cannot connect to SQL Server 2008 with PDO dblib Previous Comments: ------------------------------------------------------------------------ [2012-10-12 02:39:42] larue...@php.net Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=0c0b5a3543f37dc3dfe7fa55629f2749c0b05294 Log: Fixed bug #63258 (seg fault with PDO and dblib using DBSETOPT(H->link, DBQUOTEDIDENT, 1)) ------------------------------------------------------------------------ [2012-10-12 02:38:28] larue...@php.net Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=0c0b5a3543f37dc3dfe7fa55629f2749c0b05294 Log: Fixed bug #63258 (seg fault with PDO and dblib using DBSETOPT(H->link, DBQUOTEDIDENT, 1)) ------------------------------------------------------------------------ [2012-10-11 16:21:34] ssuffic...@php.net The patch looks legit. I'm not sure why I used 1 instead of null for the parameter value. I have not posted patches since the source was moved to git. Please merge this change for me if possible. ------------------------------------------------------------------------ [2012-10-11 10:23:57] larue...@php.net ssufficool, do you have time to look into this? seems you intentionally change the "NULL" to "1" in https://github.com/php/php- src/commit/36b8c4cb thanks ------------------------------------------------------------------------ [2012-10-11 10:22:26] larue...@php.net according to MSDN, the fix should be: diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c index 77832f9..baf1dcc 100644 --- a/ext/pdo_dblib/dblib_driver.c +++ b/ext/pdo_dblib/dblib_driver.c @@ -315,7 +315,7 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ DBSETOPT(H->link, DBTEXTSIZE, "2147483647"); /* allow double quoted indentifiers */ - DBSETOPT(H->link, DBQUOTEDIDENT, 1); + DBSETOPT(H->link, DBQUOTEDIDENT, NULL); see: http://msdn.microsoft.com/en-us/library/aa937147(v=sql.80).aspx " Note When you use DBQUOTEDIDENT, you must set param to NULL. " ------------------------------------------------------------------------ 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 https://bugs.php.net/bug.php?id=63258 -- Edit this bug report at https://bugs.php.net/bug.php?id=63258&edit=1