SQL Server configuration giving [ODBC Driver 17 for SQL Server TCP Provider: Error code 0x2746

36 Views Asked by At

I am using old SQL Server which I am trying to access remotely. It is giving me this error

[Microsoft][ODBC Driver 18 for SQL Server]TCP Provider: Error code 0x2746

I already have sqlsrv, pdo_sqlsrv extensions configured.

I read about downgrading my odbc driver but when I try to download odbc 13 it gives me dependencies error

Problem: conflicting requests
  - nothing provides libcrypto.so.10()(64bit) needed by msodbcsql-13.0.1.0-1.x86_64
  - nothing provides libcrypto.so.10(libcrypto.so.10)(64bit) needed by msodbcsql-13.0.1.0-1.x86_64
  - nothing provides libcrypto.so.10(OPENSSL_1.0.1)(64bit) needed by msodbcsql-13.0.1.0-1.x86_64
  - nothing provides libssl.so.10()(64bit) needed by msodbcsql-13.0.1.0-1.x86_64
  - nothing provides libssl.so.10(libssl.so.10)(64bit) needed by msodbcsql-13.0.1.0-1.x86_64
  - nothing provides libcrypto.so.10()(64bit) needed by msodbcsql-13.1.0.0-1.x86_64

My openssl version 3.0.8 Php 8.1.27 I am trying to upload laravel project on aws ec2.

here is my config/database.php


        'sqlsrv' => [
            'driver' => 'sqlsrv',
            'url' => env('DATABASE_URL'),
            'host' => env('DB_HOST', 'ipaddress'),
           // 'port' => env('DB_PORT', '1433'),
            'database' => env('DB_DATABASE', 'xxx'),
            'username' => env('DB_USERNAME', 'yyy'),
            'password' => env('DB_PASSWORD', 'xxx'),
            'charset' => 'utf8',
            'prefix' => '',
            'prefix_indexes' => true,
            // 'encrypt' => env('DB_ENCRYPT', 'yes'),
           // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', >
        ],

in .env

DB_HOST=ipadress
DB_CONNECTION=sqlsrv
DB_PORT=1433
DB_DATABASE=xxx
DB_USERNAME=xxx
DB_PASSWORD=xxx
0

There are 0 best solutions below