简体   繁体   English

PHP无法连接到MS SQL Server

[英]PHP Unable to connect to MS SQL server

I have used default MS SQL driver to connect to a SQL server in a php application. 我已经使用默认的MS SQL驱动程序连接到php应用程序中的SQL Server。 I'm using XAMPP 1.6.8. 我正在使用XAMPP 1.6.8。 my php version is 5.2.6. 我的PHP版本是5.2.6。

Application was connected successfully to the SQL server and the application was running successfully for a long time. 应用程序已成功连接到SQL Server,并且该应用程序已成功运行了很长时间。 Now suddenly the application is showing an error on mssql_connect() function with same MS SQL access information. 现在突然,应用程序在具有相同MS SQL访问信息的mssql_connect()函数上显示错误。 the error is "Unable to connect to server: xxx.xxx.xxx.xxx" 错误是“无法连接到服务器:xxx.xxx.xxx.xxx”

I also checked the SQL server access info with a SQL client. 我还通过SQL客户端检查了SQL Server访问信息。 SQL client can connect successfully, therefore i think the access info is correct. SQL客户端可以成功连接,因此我认为访问信息是正确的。

Can any one help me resolved this issue? 谁能帮我解决这个问题?

Thx 谢谢

I just found my solution here. 我刚刚在这里找到了解决方案。 http://jimmyli.net/2009/03/php-unable-to-connect-to-mssql/ .problem was that the file ntwdblib.dll packaged with PHP5 was an old version. http://jimmyli.net/2009/03/php-unable-to-connect-to-mssql/。问题是与PHP5一起打包的ntwdblib.dll文件是旧版本。 then i just replace with updated one from here http://jimmyli.net/wp/wp-content/uploads/2009/03/ntwdblib.zip 然后我只用这里的更新版本替换一下http://jimmyli.net/wp/wp-content/uploads/2009/03/ntwdblib.zip

Thx 谢谢

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

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