none
This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86 RRS feed

  • Question

  • I tried to connect from php to SQLSERVER2012 on my ISP's server:

    Any Ideas?

    Thanks,

    Milt

    <?PHP

       dl('c:\ppht\php_sqlsrv_53_ts.dll');    $hostname = "dba2012.db.2818339.hostedresource.com";
        $username=$database = "dba2012";
        $password = "Sx3edc4rfv!";
        $connectionInfo = array( "Database"=>"dba2012");     //Connecting to database
        try {
            $connect=sqlsrv_connect($hostname,$connectionInfo);
           if($connect==false) {
             echo "Could not connect.\n";
             die(print_r(sqlsrv_errors(),true));
          }
        } catch (Exception $e) { echo "e->getMessage()=$e->getMessage()"; }
    ?>

    And got the following warning:

    Could not connect.
    Array (
        [0] => Array
            (
                [0] => IMSSP
                [SQLSTATE] => IMSSP
                [1] => -49
                [code] => -49
                [2] => This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712
                [message] => This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712
            )

        [1] => Array         (
                [0] => IM002
                [SQLSTATE] => IM002
                [1] => 0
                [code] => 0
                [2] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
                [message] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
            )
    )




    miltonkbenjamin

    Saturday, December 21, 2013 9:21 PM

Answers

All replies

  • Hello,

    Please try to download the  SQL Server 2012  Native Client which contains both the SQL OLE DB provider and SQL ODBC driver. You can download the SQL Server 2012 Native Client X64 Package (sqlncli.msi) from the Install Instructions section of the following link:
    http://www.microsoft.com/en-us/download/details.aspx?id=29065

    Regards,
    Fanny Liu


    Fanny Liu
    TechNet Community Support

    Monday, December 23, 2013 1:56 PM
    Moderator
  • I downloaded the 32-bit version of SQL Server 2012 native client (v11.0) sqlncli.msi, and also the 32-bit version of msodbcsql.msi

    Supported Operating System

    Windows 7, Windows Server 2008 R2, Windows Server 2008 Service Pack 2, Windows Vista Service Pack 2

    http://go.microsoft.com/fwlink/?LinkID=239647&clcid=0x409  (sqlncli.msi x86)

    NEITHER of them will install on my computer, which is Win7 SP1

    The installer says it is not supported on this version of Windows.  Please explain what I'm doing wrong.

    EDIT: never mind I was using the x86 32-bit version ; should be using the x64 version for my 64-bit Win7

    • Edited by Jeremy Dunn Wednesday, March 12, 2014 4:38 PM
    Wednesday, March 12, 2014 4:05 PM
  • Fanny,

    I've a Windows Small business Server 2011 Box. SQL Server 2012 is installed. I'm able to connect to the SQL Server by Windows Authentication using SQL Management Studio. I'm also able to create a system DSN using "Microsoft ODBC Driver 11 for SQL Server" and successfully connect to the SQL Server. I've 32-bit WAMP server with PHP5.5 installed. I've SQLSRV 3.0 (SQLSRV32) installed. 

    When I try to connect using php code (sqlsrv_connect) I get the following error.

    "Array ( [0] => Array ( [0] => IMSSP [SQLSTATE] => IMSSP [1] => -49 [code] => -49 [2] => This extension requires the Microsoft ODBC Driver 11 for SQL Server. Access the following URL to download the ODBC Driver 11 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712 [message] => This extension requires the Microsoft ODBC Driver 11 for SQL Server. Access the following URL to download the ODBC Driver 11 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712 ) [1] => Array ( [0] => IM002 [SQLSTATE] => IM002 [1] => 0 [code] => 0 [2] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified [message] => [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified ) )"

    Why is my SQLSRV not able t find the native client in C"\windows\system32 folder?

    Really appreciate your help!

    Regards,

    nidhi

    Thursday, December 10, 2015 12:55 PM