无法从 Linux 平台上的浏览器中的 php 文件连接到 SQL Server
我使用 unixodbc 和 FreeTDS 从 Linux 连接到 SQL Server。连接成功。此外,当我从命令提示符运行 php 代码时,它会正确执行,但是当我尝试在 Web 浏览器中运行代码时,它会给出错误“无法连接到服务器”。
I have used unixodbc and FreeTDS for connecting to SQL Server from linux. Connection made successfully. Also when I run php code from command prompt it executes correctlly but when I try to run code in web browser it gives me error "Could not connect to Server".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我查了一下,是权限问题。当我授予 odbc.ini、freetds.conf、odbcinst.ini 的所有访问权限时,就可以在包含 Sql 服务器连接代码的 Web 浏览器中访问 php 页面。
I have searched It's problem of permissions. When I give all access permissions for odbc.ini, freetds.conf, odbcinst.ini then it is possible to access php pages in Web browser containing Sql server connection code.