How to connect to sql server database |
[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??
[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
[eluser]Otemu[/eluser]
Check out this topic http://ellislab.com/forums/viewthread/171148/
[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
[eluser]Damir Sivic[/eluser]
tray with new DB_driver.php from github https://github.com/EllisLab/CodeIgniter/...driver.php also: http://ellislab.com/forums/viewthread/197527/
[eluser]Mohammed Zayan[/eluser]
Thanks Damir Sivic now it work. I edit sqlsrv_driver.php file Code: function db_pconnect()
[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 |
Welcome Guest, Not a member yet? Register Sign In |