Questions about the PHP configuration

Source: Internet
Author: User
Tags sql server books
About PHP configuration Issues
Environment: Win7 iis7.5 php5.3.10 MSSQL 2008


Use PHP to connect to Microsoft's sqlsrv under SQL. Well, you can have Hello world.


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


This appears as a result:

Could not connect. Array ([0] = = Array ([0] = = 08001 [SQLSTATE] = 08001 [1] = = [Code] = [2] = [Microsoft][sql Se RVer Native Client 10.0]named Pipes provider:could not open a connection to SQL Server [53]. [Message] = [Microsoft][sql Server Native Client 10.0]named Pipes provider:could not open a connection to SQL server [1] = = Array ([0] = HYT00 [SQLSTATE] = HYT00 [1] = 0 [Code] = 0 [2] = [Microsoft][sql Serv Er Native client 10.0]login timeout expired [message] = [Microsoft][sql Server Native Client 10.0]login timeout expire D) [2] = = Array ([0] = 08001 [SQLSTATE] = 08001 [1] = = [Code] = [2] = [Microsoft][sql Server Native Client 10.0]a network-related or instance-specific error have occurred while establishing A connection to SQL Serve R. Server is not a 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 have occurred while Establishing a connection to SQL Server. Server is not a 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. ) )

What's the matter with his mother? I've been doing this for two days. Going to freak out. Who can help?

------Solution--------------------
$serverName = "' Local '";
$conn = Sqlsrv_connect ($serverName);
????

Connect to the database don't even have a username? When was this generous?
Local represents the only instance of the current service I, what do you do at home with so many quotes
------Solution--------------------

If you need to read this reply, please login or register csdn!


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

If you need to read this reply, please login or register csdn!


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

If you need to read this reply, please login 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.