Warning: mssql_connect () [function. mssql-connect]: _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
Warning: mssql_connect () [function. mssql-connect]:. Warning: mssql_connect () [function. mssql-connect .? Php Tutorial $ conmssql_connect (lo Warning: mssql_connect () [function. mssql-connect]:
I did this. make sure that mssql is a normal user name and password, but the following is not acceptable.

$ Con = mssql_connect ("localhost", "sa", "123456") or die ('error ');

?>

Error message
Warning: mssql_connect () [function. mssql-connect]: unable to connect to server: $ sa in d: php2.php on line 11
Error

Let's take a look at my solutions,
The system is:
Win2003 + mssql2000 + php5.23

Implementation method

Is there any ntwdblib. dll file in the php directory? Ntwdblib. dll is the client connection Library. if you check the version number, it will usually be 7.0. this can only be connected to mssq 7.0, in order to be the same as the tutorial version of our current database, we can set ntwdblib under mssql. copy the dll to the directory where your php is located and replace the 7.0. restart iis.


If your mssql connection is faulty, you can use the built-in function mssql_get_last_message () in php to obtain the error message.

Http://www.bkjia.com/PHPjc/632354.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/632354.htmlTechArticlewarning: mssql_connect () [function. mssql-connect. ? Php Tutorial $ con = mssql_connect (lo...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.