Ask the Warrior to save Yo (PHP connection mssql problem)

Source: Internet
Author: User
Tags mssql client mssql server
Environment:
1.MYSQL installed in CentOS 5.9,
2.MSSSQL 2005 +win7,win7 on the Installation (Ntwdblib) version is also 2005.

Problem:
I use PHP connection MSSQL, if connected to the local can also
$res = Mssql_connect (' 127.0.0.1 ', ' sa ', ' 123 ');
Var_dump ($res);
?>
If I have the same configuration from another computer, the firewall is turned off. The related services have also been opened. So also the connection is not successful.


Reply to discussion (solution)

Does the other computer also have Msssql 2005 installed?
What is the PHP version?

Does the SA account allow remote access in MSSQL?

Does the other computer also have Msssql 2005 installed?
RE: No

What is the PHP version? 5.3

Does the SA account allow remote access in MSSQL?
RE: Yes

Does the other computer also have Msssql 2005 installed?
RE: No

What is the PHP version? 5.3

Does the SA account allow remote access in MSSQL?
RE: Yes
Is your PHP and MSSQL running on a single machine? If not, does the machine running PHP install the MSSQL extension? Does the connection IP change to the IP of the MSSQL server?

There is a change to IP.
is the MSSQL extension not ntwdblib.dll? Or is it something else?

PHP extension Library with PHP open on server side
Is there any other MSSQL or PHP extensions installed on the client side?

I just checked. php is 5.2.

1, not the same machine, the ServerName should be the target machine name or IP +/instance Name
2, PHP 5.3 has no MSSQL extension
3, Msssql 2005 is not allowed by default remote access, you need to open your own

1, not the same machine, the ServerName should be the target machine name or IP +/instance Name
RE: No multiple instances, direct IP
2, PHP 5.3 has no MSSQL extension
RE: Just checked 2.96
3, Msssql 2005 is not allowed by default remote access, you need to open your own
mssql2005 remote is turned on because the remote with MSSQL client can be connected successfully

MSSQL OS win2003 +r2

Output a mistake and see what it is.

  • 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.