Cannot connect to SQL Server 2008 with PDO dblib
| Bug #63638 | Cannot connect to SQL Server 2008 with PDO dblib | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2012-11-28 21:09 UTC | Modified: | 2013-06-01 06:01 UTC |
|
||||||||||
| From: | pmeunier at cybergeneration dot com | Assigned: | laruence (profile) | |||||||||||
| Status: | Closed | Package: | PDO related | |||||||||||
| PHP Version: | 5.4.9 | OS: | Linux Slackware 13 | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2012-11-28 21:09 UTC] pmeunier at cybergeneration dot com
Description:
------------
We are relying on PDO_DBLIB to connect to our SQL Server 2008 Server in PHP,
hosted on a Linux platform. We were running PHP 5.4.7 and everything was fine.
When we upgraded to 5.4.9, all connections to SQL Server were failing with the
following error : Warning: PDO::__construct(): Called dbsetopt with parameter 3
NULL (severity 11). We tried with different logins to be sure that it was not a
permission issue, but the bug also occurs when trying to log with 'sa'.
Test script:
---------------
$connection = new PDO('dblib:host=myServerHost;dbname=MyDatabase', 'username', 'pass');
Expected result:
----------------
We expect no warnings to be thrown and connection to SQL Server to work
Actual result:
--------------
A warning is thrown : Warning: PDO::__construct(): Called dbsetopt with parameter
3 NULL (severity 11)
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2012-11-28 21:43 UTC] pmeunier at cybergeneration dot com
[2012-12-05 16:49 UTC] f dot marquis at of2m dot fr
[2012-12-07 16:37 UTC] wdmeldon at gmail dot com
[2013-01-19 03:14 UTC] ssufficool@php.net
[2013-03-20 19:01 UTC] jwatson at fh dot org