CodeIgniter Forums
SQL server configuration with codeigniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: SQL server configuration with codeigniter (/showthread.php?tid=63841)



SQL server configuration with codeigniter - MaheryFan - 12-14-2015

Hello everyone.
I'm asking for help because my configuration doesn't work.
I've installed SQL server 2014 express version recently.
For the configuration, i launched the driver php sql .exe, and after unpacking, i copied php_sqlsrv_54_ts.dll to the location of installation of php.
It means c:\xampp\php
Then, i installed sql native client, but i doesn't work. A notification says that a recent version of it is already installed here, so i passed to the next step. Adding a line in line number 1033 :    extension=php_sqlsrv_54_ts.dll   on c:\xampp\php\php.ini
And for the configuration in database.php of my project, i used this:

$db['default']['hostname'] = "127.0.0.1"; // or put the IP of your SQL Server Instance
$db['default']['port'] = 1433; // or the port you configured on step 6
$db['default']['username'] = ''; //no username because i used windows authentification
$db['default']['password'] = ''; //th same as username case
$db['default']['database'] = 'database';
$db['default']['dbdriver'] = 'sqlsrv';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = FALSE; // changed (true by default)
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;

Please, i need help
Thank you for listenning to me Smile


RE: SQL server configuration with codeigniter - MaheryFan - 12-14-2015

Is there anyone who has tried the same thing as me? :/


RE: SQL server configuration with codeigniter - umittas2000 - 01-25-2016

Did you solve it? I have same issue in Codeigniter 3.0.4 & Wamp server, I followed same steps but failed,
Fatal error: Call to undefined function sqlsrv_connect() C:\....\database\drivers\sqlsrv\sqlsrv_driver.php on line 144

It looks like issue on Codeigniter side,
I followed all steps on following link: https://futbolsalas15.wordpress.com/2014/02/23/7-steps-to-make-sql-server-and-codeigniter-works/

it did not help me...


RE: SQL server configuration with codeigniter - Narf - 01-26-2016

(01-25-2016, 11:44 PM)umittas2000 Wrote: Did you solve it? I have same issue in Codeigniter 3.0.4 & Wamp server, I followed same steps but failed,
Fatal error: Call to undefined function sqlsrv_connect() C:\....\database\drivers\sqlsrv\sqlsrv_driver.php on line 144

It looks like issue on Codeigniter side,
I followed all steps on following link: https://futbolsalas15.wordpress.com/2014/02/23/7-steps-to-make-sql-server-and-codeigniter-works/

it did not help me...

How did you determine that it's a CodeIgniter issue?


RE: SQL server configuration with codeigniter - umittas2000 - 01-26-2016

Hey I fixed mine,
Sorry, it's not from Codeigniter itself. It's because of SQL server PHP drivers not supported in 64bit.

Posted on here check it out: http://forum.codeigniter.com/thread-1621.html