简体   繁体   English

无法连接SQL SERVER 2008 R2

[英]Unable to connect SQL SERVER 2008 R2

i have one page for register ... all my config is right but my register.php can't connect to my sql server.. 我有一页用于注册...所有我的配置都正确,但是我的register.php无法连接到我的sql服务器。

Error 错误

Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: x.x.x.x in C:\xampp\htdocs\rfweb\regis.php on line 81

code in line 81 is 第81行的代码是

$connectsql=mssql_connect($db_host, $db_user, $db_pass) or die('<center><b>'.$lang_error_cant_connect1.'</b><br>'.$lang_error_cant_connect2.'<br><br><a href="regis.php">Back</a></center>');

spesification : SQL SERVER 2008 R2 and xampp 1.6 spesification:SQL SERVER 2008 R2和xampp 1.6

i've try to setting ODBC, Restart SQL, ect 我尝试设置ODBC,重新启动SQL等

anyone help me to fix it? 有人帮我解决吗?

Try sqlsrv queries instead of mssql, and make sure you properly configured the ports of your xampp. 请尝试使用sqlsrv查询而不是mssql,并确保正确配置了xampp的端口。 Another thing, try to check whether you have IIS, maybe it's blocking your xampp. 另一件事,请尝试检查您是否具有IIS,可能是它阻止了xampp。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM