CodeIgniter Forums
CI3 with SQL server - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17)
+--- Thread: CI3 with SQL server (/showthread.php?tid=77383)



CI3 with SQL server - Y6700B - 08-25-2020

Hello everyone,

I had a conexion to Sql server with the next configuration.

PHP Code:
$db['azure'] = array(
'dsn' => '',
'hostname' => 'bck-pro-sql.database.windows.net',
'username' => 'user',
'password' => 'pass',
'database' => 'CustomerServiceDB',
'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
); 


I already installed ODBC drive, sqlrv.dll for php 7.4 and modified php.ini. But I dont know why suddenly I got the next error

Unable to connect to your database server using the provided settings.
Filename: C:/xampp/htdocs/wke/system/database/DB_driver.php
Line Number: 436


It´s weird because sometimes its working normally and all of sudden crash with that error, If a restart xampp it works for some minutes.

Pls. can you help me with some advices

merci


RE: CI3 with SQL server - codedecks - 10-19-2021

Hi, I have the same issue, did you find a solution?


RE: CI3 with SQL server - Y6700B - 10-20-2021

(10-19-2021, 04:55 PM)codedecks Wrote: Hi,  I have the same issue, did you find a solution?

I just changed sqlrv.dll version 7.4 for 7.3 and it works