Hi.
I am using:
- Windows Server 2008 R2 as web server
- PHP 7.1.2
- Codeigniter 3.1.4
I have a MS SQL database in my other server.
(Windows Server 2012 R2)
I have problem about connecting to that
MS SQL server on Windows Server 2012 R2 from my
web server.
My database.php:
$db['db3']['hostname'] = '192.168.2.4';
$db['db3']['username'] = 'usrname';
$db['db3']['password'] = 'dbpassword';
$db['db3']['database'] = 'DBNAME';
$db['db3']['dbdriver'] = 'sqlsrv';
$db['db3']['dbprefix'] = '';
$db['db3']['pconnect'] = FALSE;
$db['db3']['db_debug'] = TRUE;
$db['db3']['cache_on'] = FALSE;
$db['db3']['cachedir'] = '';
$db['db3']['char_set'] = 'utf8';
$db['db3']['dbcollat'] = 'utf8_general_ci';
$db['db3']['swap_pre'] = '';
$db['db3']['autoinit'] = TRUE;
$db['db3']['stricton'] = FALSE;
And i have already installed
php_sqlsrv_7_ts_x64.dll and added to my php.ini
But, i get error like this.
An uncaught Exception was encountered
Type: Error
Message: Call to undefined function sqlsrv_connect()
Filename: C:\inetpub\modul\system\database\drivers\sqlsrv\sqlsrv_driver.php
Line Number: 144
Backtrace:
File: C:\inetpub\modul\application\controllers\Welcome.php
Line: 111
Function: database
File: C:\inetpub\modul\index.php
Line: 315
Function: require_once
What should i do to solve this problem?