Unable to connect to your database server using the provided settings.

Hello. I'm stuck trying to connect to a MS Sql 2017 server using CI 3.1.6, running XAMPP on a windows machine (same as SQL server).

I successfully installed the php extension php_sqlsrv_56_ts.dll and verified it works (using standard php syntax) but I'm unable to get the CI driver connecting. Maybe I'm writing the connection wrong? Any help much appreciated. My error is:

A Database Error Occurred Unable to connect to your database server using the provided settings.

Filename: E:/xampp/htdocs/psg_erw/system/database/DB_driver.php

Line Number: 436

My connection script:

Code: $db['default'] = array( 'dsn' => '', 'hostname' => 'RYNPRB', 'username' => 'sa', 'password' => 'riyan12@', 'database' => 'sample', 'dbdriver' => 'sqlsrv', 'dbprefix' => '', 'pconnect' => FALSE, 'db_debug' => (ENVIRONMENT !== 'production'), 'cache_on' => FALSE, 'cachedir' => '', 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE );

Please, anyone????

avatar riyanpurba
@riyanpurba

1 Kontribusi 0 Poin

Dipost 6 tahun yang lalu

Belum ada Jawaban. Jadi yang pertama Jawaban

Login untuk ikut Jawaban