No it's not a Duplicate. In that also they said to include dll files. I did it but still I got same error
I need to connect sql server to codeigniter project. And I added
extension = php_sqlsrv_56_ts.dll in php.ini
But still I got fatal Error.
$db['default'] = array(
'dsn' => '',
'hostname' => 'ADMIN-PC\SQLEXPRESS',
'username' => 'name',
'password' => 'password',
'database' => 'dbname',
'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
);
This is what I got while run this on localhost (Appache Server)
Fatal error: Call to undefined function sqlsrv_connect() in C:\xampp\htdocs\MyProject\system\database\drivers\sqlsrv\sqlsrv_driver.php on line 144
A PHP Error was encountered Severity: Error
Message: Call to undefined function sqlsrv_connect()
Filename: sqlsrv/sqlsrv_driver.php
Line Number: 144
Backtrace: