I use PHP 5.6, I downloaded all the necessary driver for the work, I try to execute the following code

$host = ""; $conInfo = array("Database"=>"", "UID"=>"", "PWD"=>""); $con = sqlsrv_connect($host, $conInfo); if($con){ echo "Success!"; }else{ echo "Fail.."; } 

Displays Fail..Please tell me what am I doing wrong?

  • duck and check sqlsrv_errors . - teran
  • This extension requires the Microsoft ODBC Driver 11 for SQL Server. Access the ODBC Driver 11 for SQL Server for x86 - dexploizer
  • Well, not all drivers have been installed, so :) - teran
  • one
    @YuriGo you wrote the answer to your question, download and install the Microsoft® ODBC 11 driver for SQL Server - Alex

1 answer 1

System requirements for sql php .

Mistake:

This extension requires the Microsoft ODBC Driver 11 for SQL Server. Access the ODBC Driver 11 for SQL Server for x86

talks about the need to install Microsoft ODBC Driver 11 for SQL Server. Download page .