Questions about php configuration

Source: Internet
Author: User
Tags sql server books
Environment for php configuration problems: win7iis7.5php5.3.10mssql2008 use php to connect to Microsoft sqlsrv under SQL. After installation, you can use helloworld to test Microsoft's test case: PHPcode & lt ;? Php * ConnecttothelocalserverusingWindowsAuthenticationands about php configuration
Environment: win7 iis7.5 php5.3.10 mssql 2008


Use php to connect Microsoft sqlsrv under SQL. Hello world


Test cases for Microsoft:
PHP code
  
   $value)      {              echo $key.": ".$value."\n";      }}else{       echo "Client info error.\n";}/* Close connection resources. */sqlsrv_close( $conn);?>


The result is as follows:

Cocould not connect. array ([0] => Array ([0] => 08001 [SQLSTATE] => 08001 [1] => 53 [code] => 53 [2] => [Microsoft] [SQL Server Native Client 10.0] Named Pipes Provider: cocould not open a connection to SQL Server [53]. [message] => [Microsoft] [SQL Server Native Client 10.0] Named Pipes Provider: cocould not open a connection to SQL Server [53].) [1] => Array ([0] => HYT00 [SQLSTATE] => HYT00 [1] => 0 [code] => 0 [2] => [Microsoft] [SQL Server Native Client 10.0] Login timeout expired [message] => [Microsoft] [SQL Server Native Client 10.0] Login timeout expired) [2] => Array ([0] => 08001 [SQLSTATE] => 08001 [1] => 53 [code] => 53 [2] => [Microsoft] [SQL Server Native Client 10.0] A network-related or instance-specific error has occurred while establishing a connection to SQL Server. server is not found or not accessible. check if instance name is correct and if SQL Server is configured to allow remote connections. for more information see SQL Server Books Online. [message] => [Microsoft] [SQL Server Native Client 10.0] A network-related or instance-specific error has occurred while establishing a connection to SQL Server. server is not found or not accessible. check if instance name is correct and if SQL Server is configured to allow remote connections. for more information see SQL Server Books Online .))

How is his mother doing. I have been engaged for two days. It's going crazy. Who can help

------ Solution --------------------
$ ServerName = "'local '";
$ Conn = sqlsrv_connect ($ serverName );
????

Do I have to connect to the database with a user name? When is it so generous?
Local indicates the only instance in the current service I.
------ Solution --------------------

To read this reply, log on to or register CSDN!


------ Solution --------------------

To read this reply, log on to or register CSDN!


------ Solution --------------------

To read this reply, log on to or register CSDN!

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.