skip to Main Content

I can’t connect to database. i have these extension php_pdo_sqlsrv_72_ts_x64.dll, php_sqlsrv_72_ts_x64 and added “extension = php_sqlsrv_72….” line in php.ini file. What am i doing wrong?

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

Filename:
C:/Apache24/htdocs/smartattendanceciwec/system/database/DB_driver.php

Line Number: 436

$active_group = 'default';
$query_builder = TRUE;

$db['default'] = array(
    'dsn'   => '',
    'hostname' => 'localhost',
    'username' => 'sa',
    'password' => 'password',
    'database' => 'Hospital',
    'dbdriver' => 'sqlsrv',
    'dbprefix' => '',
    'pconnect' => FALSE,
    'db_debug' => TRUE,
    'cache_on' => FALSE,
    'cachedir' => '',
    'char_set' => 'utf8',
    'dbcollat' => 'utf8_general_ci',
    'swap_pre' => '',
    'encrypt' => FALSE,
    'compress' => FALSE,
    'stricton' => FALSE,
    'failover' => array(),
    'save_queries' => TRUE
);

2

Answers


  1. Chosen as BEST ANSWER

    I found the answer, what I need was the ODBC driver.


  2. what you are missing is odbc driver in your system.
    beacuse you are using server 2008 R2 you will need to install odbc driver 11
    you can download it from here: https://www.microsoft.com/en-us/download/details.aspx?id=36434

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search