php driver does not work after updating xamp

1

I have updated XAMP to the latest version, which comes with php 7.2.

I have added the drivers to xamp / php / ext /:

php_pdo_sqlsrv_72_nts.dll
php_pdo_sqlsrv_72_nts.dll
php_sqlsrv_72_ts.dll
php_sqlsrv_72_ts.dll

I have also configured the php.ini:

extension=php_pdo_sqlsrv_72_nts_x86
extension=php_sqlsrv_72_nts_x86
extension=php_pdo_sqlsrv_72_ts_x86
extension=php_sqlsrv_72_ts_x86

Here my connection code to SQL SERVER:

<?php

$serverName = "NOWAY\SQLEXPRESS"; //serverName\instanceName
$connectionInfo = array( "Database"=>"a1", "UID"=>"root", "PWD"=>"NOWAY");
$conn = sqlsrv_connect( $serverName, $connectionInfo);

    if( $conn ) {
         echo "Conexión establecida.<br/>";
    }else{
         echo "Conexión no se pudo establecer.<br/>";
         die( print_r( sqlsrv_errors(), true));
    }
}

Finally I have this error:

  

Connection could not be established. Array ([0] = > Array ([0] => IMSSP   [SQLSTATE] = > IMSSP 1 = > -49 [code] = > -49 [2] = > This extension   Requires the Microsoft ODBC Driver for SQL Server. Access the   Next URL to download the ODBC Driver for SQL Server for x86:    link [message] = > Este   extension requires the Microsoft ODBC Driver for SQL Server. Access   the following URL to download the ODBC Driver for SQL Server for x86:    link ) 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))

I have also verified if I have installed the ODBC driver in windows

As you can see, I have attacked the situation in several ways and I still can not find the solution. How could I solve this error?

    
asked by Rick Out. 12.05.2018 в 21:59
source

1 answer

0
  

Thanks to Leonardo Cabré's comment, I proceeded to download the version   of ODBC 17.

install and Vualá !!:

  

Connection established.   2017-04-18, 11:22   2017-04-18, 12:13   2017-04-18, 12:14   2017-04-19, 01:06   2017-04-19, 10:39

Thank you Leonardo Cabré.

    
answered by 13.05.2018 в 18:08