mwanly Posted October 26, 2013 Share Posted October 26, 2013 Hello i have sql server database and want to connect with PHP can any one tell why i get this fatal error when i use mssql_connect : Fatal error: Call to undefined function mssql_connect() in C:\AppServ\www\esest07\config.php on line 12 (line 12 : <$conn = mssql_connect($MyServer, $MyUser, $MyPass);> i only can connet by odbc_connect , but i dont want use this connection i want mssql_connect Please help Quote Link to comment https://forums.phpfreaks.com/topic/283318-fatal-error-in-mssql_connect/ Share on other sites More sharing options...
kicken Posted October 26, 2013 Share Posted October 26, 2013 You have to enable the MSSQL extension by loading the appropriate .dll via php.ini. This extension however is deprecated and is not even included with PHP in 5.3 and above. Since you are on a windows server, what you should be using is the SQLSRV extension which is available either as a set of functions or as a PDO driver. Have a read over the Requirements and Installation pages in the manual to find out how to get it and set it up. Quote Link to comment https://forums.phpfreaks.com/topic/283318-fatal-error-in-mssql_connect/#findComment-1455572 Share on other sites More sharing options...
mwanly Posted October 26, 2013 Author Share Posted October 26, 2013 thank you very much i solved it by use php 5.2 and now mssql is available . But now i have another problem in character .. my data result is like this : ??????? how can i change characterset ?? thanks a lot Quote Link to comment https://forums.phpfreaks.com/topic/283318-fatal-error-in-mssql_connect/#findComment-1455603 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.