Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-239

CI 2 + DOCTRINE 2 + SQLSERVER 2005 PDO_SQLSRV.DLL

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Security Level: All
    • Labels:
      None
    • Environment:
      os:windows xp
      sqlserver2005

      Description

      Hi, master...

      Please help me,
      i was integration : ci2+doctrine2+pdo_mysql status is OK http://103.28.148.89/ci2doctrine2
      php.ini http://103.28.148.89 ===> phpinfo()

      But ci2+doctrine2+pdo_sqlsrv. Show bugs this :

      "Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[IMSSP]: This extension requires either the Microsoft SQL Server 2008 Native Client (SP1 or later) or the Microsoft SQL Server 2008 R2 Native Client ODBC Driver to communicate with SQL Server. Neither of those ODBC Drivers are currently installed. Access the following URL to download the Microsoft SQL Server 2008 R2 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712' in C:\xampp\htdocs\sqlserver\application\third_party\doctrine-orm\Doctrine\DBAL\Driver\PDOConnection.php:36 Stack trace: #0 C:\xampp\htdocs\sqlserver\application\third_party\doctrine-orm\Doctrine\DBAL\Driver\PDOConnection.php(36): PDO->_construct('sqlsrv:server=B...', 'sa', 'password', Array) #1 C:\xampp\htdocs\sqlserver\application\third_party\doctrine-orm\Doctrine\DBAL\Driver\PDOSqlsrv\Driver.php(38): Doctrine\DBAL\Driver\PDOConnection->_construct('sqlsrv:server=B...', 'sa', 'password', Array) #2 C:\xampp\htdocs\sqlserver\application\third_party\doct in C:\xampp\htdocs\sqlserver\application\third_party\doctrine-orm\Doctrine\DBAL\Driver\PDOConnection.php on line 36"

      Thanks
      GBU

        Activity

        M. David Zainuri created issue -
        Hide
        M. David Zainuri added a comment -

        This Problem is resolve with SQL Server 2008.

        But i have new problem, paging is Error

        "Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: [Microsoft][SQL Server Native Client 10.0][SQL Server]The multi-part identifier "c0_.group_company_code" could not be bound.' in C:\xampp\htdocs\sqlserver\application\third_party\doctrine-orm\Doctrine\DBAL\Connection.php:577 Stack trace: #0 C:\xampp\htdocs\sqlserver\application\third_party\doctrine-orm\Doctrine\DBAL\Connection.php(577): PDO->query('WITH outer_tbl ...') #1 C:\xampp\htdocs\sqlserver\application\third_party\doctrine-orm\Doctrine\ORM\Query\Exec\SingleSelectExecutor.php(46): Doctrine\DBAL\Connection->executeQuery('WITH outer_tbl ...', Array, Array) #2 C:\xampp\htdocs\sqlserver\application\third_party\doctrine-orm\Doctrine\ORM\Query.php(274): Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute(Object(Doctrine\DBAL\Connection), Array, Array) #3 C:\xampp\htdocs\sqlserver\application\third_party\doctrine-orm\Doctrine\ORM\AbstractQuery.php(539): Doctrine\ORM\Query->_doExecute() #4 C:\xampp\htdocs\sqlserver\application\third_party\doctri in C:\xampp\htdocs\sqlserver\application\third_party\doctrine-orm\Doctrine\DBAL\Connection.php on line 577"

        This link http://103.28.148.89/sqlserver/index.php/company_group/posts/list_company_group

        Any body help...

        Thanks

        Show
        M. David Zainuri added a comment - This Problem is resolve with SQL Server 2008. But i have new problem, paging is Error "Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE [42000] : [Microsoft] [SQL Server Native Client 10.0] [SQL Server] The multi-part identifier "c0_.group_company_code" could not be bound.' in C:\xampp\htdocs\sqlserver\application\third_party\doctrine-orm\Doctrine\DBAL\Connection.php:577 Stack trace: #0 C:\xampp\htdocs\sqlserver\application\third_party\doctrine-orm\Doctrine\DBAL\Connection.php(577): PDO->query('WITH outer_tbl ...') #1 C:\xampp\htdocs\sqlserver\application\third_party\doctrine-orm\Doctrine\ORM\Query\Exec\SingleSelectExecutor.php(46): Doctrine\DBAL\Connection->executeQuery('WITH outer_tbl ...', Array, Array) #2 C:\xampp\htdocs\sqlserver\application\third_party\doctrine-orm\Doctrine\ORM\Query.php(274): Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute(Object(Doctrine\DBAL\Connection), Array, Array) #3 C:\xampp\htdocs\sqlserver\application\third_party\doctrine-orm\Doctrine\ORM\AbstractQuery.php(539): Doctrine\ORM\Query->_doExecute() #4 C:\xampp\htdocs\sqlserver\application\third_party\doctri in C:\xampp\htdocs\sqlserver\application\third_party\doctrine-orm\Doctrine\DBAL\Connection.php on line 577" This link http://103.28.148.89/sqlserver/index.php/company_group/posts/list_company_group Any body help... Thanks
        Hide
        M. David Zainuri added a comment -

        Problem Resolve

        go into:
        Doctrine\DBAL\Platforms\MsSqlPlatform

        Find:

        $over = preg_replace('/\"[^,]*\".\"([^,]*)\"/i', '"inner_tbl"."$1"', $orderby);

        Add before:

                            # Get Columns
                            $columns = array();
                            if(preg_match_all('/([a-zA-Z][0-9]+_\.[a-zA-Z0-9\-_]+)\sAS\s([a-zA-Z0-9\-\_]+)/', $query, $matched)) {
                                for($i=0; $i<count($matched[1]); ++$i)
                                {
                                    $columns[$matched[1][$i]] = $matched[2][$i];
                                }
                            }
                            
                            # Replace columns with their alias in the "orderby" statement
                            if(preg_match_all('/([a-zA-Z][0-9]+_\.[a-zA-Z0-9\-_]+)\s/i', $orderby, $matches)) {
                                foreach($matches[1] as $column)
                                {
                                    $orderby = preg_replace('/'.$column.'/', $columns[$column], $orderby);
                                }
                            }
        

        Thanks on issue this link "http://www.doctrine-project.org/jira/browse/DBAL-82?page=com.atlassian.jira.plugin.system.issuetabpanels%3Achangehistory-tabpanel"

        Show
        M. David Zainuri added a comment - Problem Resolve go into: Doctrine\DBAL\Platforms\MsSqlPlatform Find: $over = preg_replace('/\ "[^,]*\" .\ "([^,]*)\" /i', ' "inner_tbl" . "$1" ', $orderby); Add before: # Get Columns $columns = array(); if (preg_match_all('/([a-zA-Z][0-9]+_\.[a-zA-Z0-9\-_]+)\sAS\s([a-zA-Z0-9\-\_]+)/', $query, $matched)) { for ($i=0; $i<count($matched[1]); ++$i) { $columns[$matched[1][$i]] = $matched[2][$i]; } } # Replace columns with their alias in the "orderby" statement if (preg_match_all('/([a-zA-Z][0-9]+_\.[a-zA-Z0-9\-_]+)\s/i', $orderby, $matches)) { foreach($matches[1] as $column) { $orderby = preg_replace('/'.$column.'/', $columns[$column], $orderby); } } Thanks on issue this link "http://www.doctrine-project.org/jira/browse/DBAL-82?page=com.atlassian.jira.plugin.system.issuetabpanels%3Achangehistory-tabpanel"
        Hide
        Benjamin Eberlei added a comment -

        CAn you post the query that leads to this error? I cant reproduce it with SQL Server 2008

        Show
        Benjamin Eberlei added a comment - CAn you post the query that leads to this error? I cant reproduce it with SQL Server 2008
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Workflow jira [ 13552 ] jira-feedback2 [ 17602 ]
        Alexander made changes -
        Status Open [ 1 ] Awaiting Testcase/Feedback [ 10000 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 17602 ] jira-feedback3 [ 19970 ]
        made changes -
        Status Awaiting Feedback [ 10000 ] In Progress [ 3 ]
        Hide
        Benjamin Eberlei added a comment -

        This was fixed in other issues already

        Show
        Benjamin Eberlei added a comment - This was fixed in other issues already
        Benjamin Eberlei made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Benjamin Eberlei made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Duplicate [ 3 ]

        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-239, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            M. David Zainuri
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: