Windows XP, WAMP, PHP 5.3, MS SQL 2008, CI, NO ODBC! [solved] |
[eluser]imorris[/eluser]
We've struggled mightly with how to setup a CI connection to MS SQL 2008 (without ODBC) and we finally have it figured out. There are no step-by-step instructions available on the internet on how to set it all up so I've decided to put them here. 1 - SQLSRV20.EXE (Google it and download from MS) is a self extracting zip that gives you access to the necessary .dll. Run SQLSRV20.EXE and note the extraction folder. Copy the extracted file php_sqlsrv_53_ts_vc6.dll to C:\wamp\bin\php\php5.3.0\ext 2 - Edit your PHP.ini file to include the extension php_sqlsrv_53_ts_vc6.dll. For example: extension = php_sqlsrv_53_ts_vc6.dll 3 - The Microsoft SQL Server 2008 Native Client is required for a successful database connection. Install this file from Microsoft: sqlncli.msi (Another Google and download) 4 - Restart All of your WAMP services. 5 - Extract and copy the three files from: http://www.phrenzy.org/code/sqlsrv-1.1.tar.gz 6 - Paste them into your project under {Project_Name}/system/database/drivers/sqlsrv. If the sqlsrv directory doesn't exist, then create it. 7 - Configure your {Project_Name}/system/application/config/database to look as follows: $db['default']['hostname'] = "servername"; $db['default']['username'] = "username"; $db['default']['password'] = "password"; $db['default']['database'] = "databasename"; $db['default']['dbdriver'] = "sqlsrv"; $db['default']['dbprefix'] = ""; $db['default']['pconnect'] = TRUE; $db['default']['db_debug'] = TRUE; $db['default']['cache_on'] = FALSE; $db['default']['cachedir'] = ""; $db['default']['char_set'] = "utf8"; $db['default']['dbcollat'] = "utf8_general_ci"; --------------------- Credit for three Code Igniter driver files goes to these sites: http://www.kaweb.co.uk/blog/mssql-server...deigniter/ http://www.phrenzy.org/code/sqlsrv-1.1.tar.gz (We actually used this page's files) |
Messages In This Thread |
Windows XP, WAMP, PHP 5.3, MS SQL 2008, CI, NO ODBC! [solved] - by El Forum - 12-10-2010, 10:06 AM
Windows XP, WAMP, PHP 5.3, MS SQL 2008, CI, NO ODBC! [solved] - by El Forum - 12-10-2010, 11:07 AM
Windows XP, WAMP, PHP 5.3, MS SQL 2008, CI, NO ODBC! [solved] - by El Forum - 12-10-2010, 11:21 AM
Windows XP, WAMP, PHP 5.3, MS SQL 2008, CI, NO ODBC! [solved] - by El Forum - 12-29-2010, 02:46 PM
|