Welcome Guest, Not a member yet? Register   Sign In
CI and MS SQL how to connect ?

Has anybody used CI with sql server please share you experience how to connect with MS sql all version what the parameter for database.php file to connect MS sql.

Hi (sorry for bad english).

MS-SQL (MS) and PHP (Mostly Linux) using in same time is always a difficult thing.

First: Over 4-6 month of searching, I can't find a working solution to connect the MSSQL database with Windows autentication on PHP. There is some setting in php.ini at MSSQL part, but it's not seems to be working. It's not the CI problem, the mssql.connect function throw an error.

Second: You may create an SQL user for PHP to connect a database. Bad point: You'll miss the windows authentication. Good: Commonly used for everywhere, with a very little security risk.

Third: You may use ODBC connection. The CI work properly with that.

Good luck.

ok that's great but can you share how to use ODBC connection parameter for CI

Well, I pick the solution with discreet SQL user. You may find a lot of docs about ODBC and CI. My advice is check the created ODBC connection with other program than PHP, to check the correct and working setup.

Theme © iAndrew 2016 - Forum software by © MyBB