Welcome Guest, Not a member yet? Register   Sign In
Error connecting to SQLSRV using pdo
#1

Hello! All good?

I'm having trouble connecting to sqlsrv using pdb_dblib.

Running on Windows 11 and loading the php_sqlsrv DLL's I can connect normally.

Now when I try to configure my connection in Ubuntu 22.04, it doesn't work at all.

PHP Code:
public $sqlsrv = [
        'DSN'      => 'dblib:host=myserver\\MSSQLSERVER;dbname=mydb',
        'hostname' => '',
        'username' => 'admin',
        'password' => 'admin',
        'database' => '',
        'DBDriver' => 'pdo',
        'DBPrefix' => '',
        'pConnect' => false,
        'DBDebug'  => (ENVIRONMENT !== 'production'),
        'charset'  => 'utf8',
        'DBCollat' => 'utf8_general_ci',
        'swapPre'  => '',
        'encrypt'  => false,
        'compress' => false,
        'strictOn' => false,
        'failover' => [],
        'port'    => 1433,
    ]; 
Reply
#2

MSSQL via the pdo driver is not supported.
https://codeigniter4.github.io/CodeIgnit...-databases
Reply




Theme © iAndrew 2016 - Forum software by © MyBB