Jump to content

Fatal Error in mssql_connect


mwanly

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.