PDO + SqlAnywhere,可能吗?

发布于 2024-08-08 19:38:23 字数 100 浏览 1 评论 0原文

我想将 PHP PDO 与 SqlAnywhere 一起使用,但 php 站点上没有驱动程序。我可以添加 sqlanywhere 库以与 PDO 一起使用吗? ODBC 是最后一个选项。

I would like use PHP PDO with SqlAnywhere, but don't have the driver on php site. Can I add a lib of sqlanywhere to use with PDO? ODBC is the last option.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

宣告ˉ结束 2024-08-15 19:38:23

PDO SQL Anywhere 驱动程序现已在此处发布: http://pecl.php.net/package/PDO_SQLANYWHERE /

A PDO SQL Anywhere driver has now been released here: http://pecl.php.net/package/PDO_SQLANYWHERE/

扮仙女 2024-08-15 19:38:23

我还没有尝试过这个,但是两天内没有人回答,所以我会给出一个建议:

理论上,PDO_MSSQL 驱动程序应该能够与任何 FreeTDS 后端通信,包括 Sybase Server 甚至 Sybase ASA。它可能需要您进行一些搜索和阅读博客、论坛等,以找出正确的 freetds.conf 条目以使其正常工作。

然而,PDO_MSSQL 驱动程序被标记为“实验性”,据我所知没有人维护它。 Microsoft 也放弃了它,因为他们正在为 SQL Server 开发自己的(非 PDO)PHP 扩展。*

因此,使用 PDO_ODBC 可能是您的更勇敢的部分。


* 几年前,微软和其他 RDBMS 供应商曾试图合作向 PDO 项目贡献代码,但核心 PHP 社区拒绝了供应商使用贡献者许可协议的要求,以确保项目中的代码保持免费。这是一个悲伤的插曲。

I haven't tried this, but no one has answered in two days so I'll give a suggestion:

The PDO_MSSQL driver should in theory be able to talk to any FreeTDS back-end, including Sybase Server and perhaps even Sybase ASA. It may require you to do some hunting and reading blogs, forums, etc. to figure out the right freetds.conf entries to make it work.

However, the PDO_MSSQL driver is marked as "experimental" and AFAIK no one is maintaining it. Microsoft has abandoned it as well, since they're developing their own (non-PDO) PHP extension for SQL Server.*

So it's probably the better part of valor on your part to use PDO_ODBC.


* There was an effort a couple of years ago for Microsoft and other RDBMS vendors to cooperate to contribute code to the PDO project, but the core PHP community rebuffed the vendors over their requirement to use a contributor license agreement to ensure that the code in the project remain free. It was a sad episode.

佼人 2024-08-15 19:38:23

是的,但是你应该修改unixodbc库,脚本:SQLExecute.c,否则会得到错误:PERMISSION DENIED CREATE STORE PROCEDURE

Yes, but you should modify the unixodbc library, the script: SQLExecute.c, otherwise will get the error : PERMISSION DENIED CREATE STORE PROCEDURE

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文