Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-35

PDO_Sqlsrv bug in _constructPdoDsn()

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-BETA2
    • Fix Version/s: 2.0.0-BETA4
    • Component/s: Drivers
    • Labels:
      None
    • Environment:
      Windows 7, Zend Server CE, Sql Server driver for PHP v2

      Description

      When connection to mssql server with pdo_sqlsrv driver you get:

       
      [PDOException]
      SQLSTATE[IMSSP]: The DSN string ended unexpectedly.
      

      Sample $connectionOptions:

      $connectionOptions = array(
          'dbname' => 'AdventureWorks',
          'user' => 'sa',
          'password' => 'sa_password',
          'host' => 'local',
          'driver' => 'pdo_sqlsrv'
      );
      

      Error is in Doctrine\DBAL\Driver\PDOSqlsrv\Driver in function _constructPdoDsn(array $params).
      On line 53 dsn starts with

      $dsn = 'sqlsrv:(';
      

      instead of

      $dsn = 'sqlsrv:server=(';
      

      as written in offical Microsoft help which come with SQL Server Driver For PHP v2.

        Activity

        Bostjan Oblak created issue -
        Hide
        Benjamin Eberlei added a comment -

        @Juozas can you evaluate this and possibly apply a fix?

        Show
        Benjamin Eberlei added a comment - @Juozas can you evaluate this and possibly apply a fix?
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Assignee Benjamin Eberlei [ beberlei ] Juozas Kaziukenas [ juokaz ]
        Hide
        Benjamin Eberlei added a comment -

        Fixed

        Show
        Benjamin Eberlei added a comment - Fixed
        Benjamin Eberlei made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Juozas Kaziukenas [ juokaz ] Benjamin Eberlei [ beberlei ]
        Fix Version/s 2.0.0-BETA4 [ 10071 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 11665 ] jira-feedback2 [ 17652 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 17652 ] jira-feedback3 [ 20007 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DBAL-35, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Bostjan Oblak
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: