enabled PDO-6ren">
gpt4 book ai didi

rhel6 上的 php pdo_informix - 未实现可选功能

转载 作者:太空宇宙 更新时间:2023-11-04 10:48:21 26 4
gpt4 key购买 nike

我已经配置了 pdo_informix:

[root@cc-allplus nginx]# php -i |egrep "pdo|PDO"
PDO
PDO support => enabled
PDO drivers => sqlite, sqlite2, odbc, pgsql, informix, dblib
pdo_dblib
PDO Driver for FreeTDS/Sybase DB-lib => enabled
pdo_informix
pdo_informix support => enabled
PDO_ODBC
PDO Driver for ODBC (unixODBC) => enabled
pdo_pgsql
PDO Driver for PostgreSQL => enabled
Revision => $Id: pdo_pgsql.c 300351 2010-06-10 12:11:19Z iliaa $
pdo_sqlite
PDO Driver for SQLite 3.x => enabled

并尝试创建连接:

try{

$dbh = new PDO ("informix:host=some.example.ru; service=50000; database=test; server=test_net; protocol=onsoctcp;DB_LOCALE=en_US.57372; CLIENT_LOCALE=en_US.57372;", "dcs_test", "********");

}catch (PDOException $e){
echo 'Failed to execute your db connection: '. $e->getMessage().'</br>'; exit;
}

响应是:

Failed to execute your db connection: SQLSTATE=HY000, SQLSetConnectAttr: -11097 [Informix][Informix ODBC Driver]Optional feature not implemented

谷歌搜索没有帮助解决这个问题..欢迎任何建议

最佳答案

问题解决了。对于那些可能在使用 informix 或其他 pdo 库时遇到同样问题的人,我想分享一下。

我的麻烦在于选择最新版本的 PDO_INFORMIX 源代码。据我搜索发现,php 5.3需要informix不晚于1.2.6版本。

我从一篇匈牙利语文章中发现了该信息,这是整个 www.

在 IBM 站点和 pdo PECL 源站点上都没有任何此类信息的字符串。天哪,这花了我几天时间,但我做到了!

在找到正确的版本后,我不得不重新编译 php,因为它已将 1.3.0 版本的 informix pdo 放入缓存中并且不想使用旧版本。

希望对您有所帮助!

关于rhel6 上的 php pdo_informix - 未实现可选功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32115470/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com