How to connect to sql server database - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: How to connect to sql server database (/showthread.php?tid=56822) |
How to connect to sql server database - El Forum - 01-23-2013 [eluser]Mohammed Zayan[/eluser] Hi there, My PHP version is 5.4.7 and I have sql server 2005 installed in the computer. I want to connect to sql server database. I edit config\database.php Code: $db['default']['dbdriver'] = 'sqlsrv'; I take these dll and put it in Code: D:\xampp\php\ext Code: extension=php_sqlsrv_54_nts.dll I have this error Fatal error: Call to undefined function sqlsrv_connect() in D:\xampp\htdocs\test\system\database\drivers\sqlsrv\sqlsrv_driver.php on line 76 How can I fix it?? How to connect to sql server database - El Forum - 01-23-2013 [eluser]Mohammed Zayan[/eluser] I change the php.ini file Code: extension=php_sqlsrv_54_ts.dll and try to connect by this code Code: $serverName = '192.123.0.1'; Code: Connection could not be established.<br />Array How to connect to sql server database - El Forum - 01-23-2013 [eluser]Otemu[/eluser] Check out this topic http://ellislab.com/forums/viewthread/171148/ How to connect to sql server database - El Forum - 01-23-2013 [eluser]Mohammed Zayan[/eluser] I connect successfully and returned data by this code Code: <meta http-equiv="content-type" c charset=utf-8" /> config\database.php Code: $active_group = 'default'; A Database Error Occurred Unable to connect to your database server using the provided settings. Filename: D:\xampp\htdocs\test\system\database\DB_driver.php Line Number: 124 How to connect to sql server database - El Forum - 01-25-2013 [eluser]Mohammed Zayan[/eluser] How can I fix this problem?? How to connect to sql server database - El Forum - 01-25-2013 [eluser]Damir Sivic[/eluser] tray with new DB_driver.php from github https://github.com/EllisLab/CodeIgniter/blob/develop/system/database/DB_driver.php also: http://ellislab.com/forums/viewthread/197527/ How to connect to sql server database - El Forum - 01-26-2013 [eluser]Mohammed Zayan[/eluser] Thanks Damir Sivic now it work. I edit sqlsrv_driver.php file Code: function db_pconnect() How to connect to sql server database - El Forum - 10-10-2013 [eluser]stefenw[/eluser] i follow all instructions in there , i download sqlsrv30.exe and add this to php.ini extension=php_sqlsrv_54_ts.dll extension=php_pdo_sqlsrv_54_ts.dll i install Native Client 10 i change sqlsrv_driver.php in folder database-driver-sqlsrv to Code: function db_pconnect() { but it not work , still Unable to connect to your database server using the provided settings. Filename: C:\xampp\htdocs\HRM\system\database\DB_driver.php Line Number: 124 what should i do ? please help |