Open nkpin opened 7 years ago
Hi
I have two databases the first is MariaDB it's works.
But when I try connect to MS SQL with sqlsrv driver or pdo_sqlsrv driver cannot connect.
Do you know something about that?
This is the error
Unable to connect to your database server using the provided settings. Filename: C:\Users\np\Documents\Proyectos\crudIgniter\system\database\DB_driver.php Line Number: 124
Unable to connect to your database server using the provided settings.
Filename: C:\Users\np\Documents\Proyectos\crudIgniter\system\database\DB_driver.php
Line Number: 124
And this is my config
$active_group = 'iscaffold'; $active_record = TRUE; $db['iscaffold']['hostname'] = $_ENV['DB_HOST']; $db['iscaffold']['hostname'] = $_ENV['DB_HOST']; $db['iscaffold']['username'] = $_ENV['DB_USER']; $db['iscaffold']['password'] = $_ENV['DB_PASS']; $db['iscaffold']['database'] = $_ENV['DB_NAME']; $db['iscaffold']['dbdriver'] = 'sqlsrv'; $db['iscaffold']['dbprefix'] = ''; $db['iscaffold']['pconnect'] = TRUE; $db['iscaffold']['db_debug'] = TRUE; $db['iscaffold']['cache_on'] = FALSE; $db['iscaffold']['cachedir'] = ''; $db['iscaffold']['char_set'] = 'utf8'; $db['iscaffold']['dbcollat'] = 'utf8_general_ci'; $db['iscaffold']['swap_pre'] = ''; $db['iscaffold']['autoinit'] = TRUE; $db['iscaffold']['stricton'] = FALSE;
$active_group = 'iscaffold'; $active_record = TRUE;
$db['iscaffold']['hostname'] = $_ENV['DB_HOST']; $db['iscaffold']['hostname'] = $_ENV['DB_HOST']; $db['iscaffold']['username'] = $_ENV['DB_USER']; $db['iscaffold']['password'] = $_ENV['DB_PASS']; $db['iscaffold']['database'] = $_ENV['DB_NAME'];
$db['iscaffold']['dbdriver'] = 'sqlsrv'; $db['iscaffold']['dbprefix'] = ''; $db['iscaffold']['pconnect'] = TRUE; $db['iscaffold']['db_debug'] = TRUE; $db['iscaffold']['cache_on'] = FALSE; $db['iscaffold']['cachedir'] = ''; $db['iscaffold']['char_set'] = 'utf8'; $db['iscaffold']['dbcollat'] = 'utf8_general_ci'; $db['iscaffold']['swap_pre'] = ''; $db['iscaffold']['autoinit'] = TRUE; $db['iscaffold']['stricton'] = FALSE;
And the environment is IIS 10 php 7.0.2 for windows and the driver is php_sqlsrv_7_nts_x64.dll
Thank you Cheers
I fix the problem.
In the file sqlsrv_driver.php line 88 the method db_pconnect not return nothing
Hi
I have two databases the first is MariaDB it's works.
But when I try connect to MS SQL with sqlsrv driver or pdo_sqlsrv driver cannot connect.
Do you know something about that?
This is the error
And this is my config
And the environment is IIS 10 php 7.0.2 for windows and the driver is php_sqlsrv_7_nts_x64.dll
Thank you Cheers