如何使连接池在 PHP-CGI PDO iSeries Access UnixODBC 连接上工作?
问题描述
我正在尝试使用 PHP/PDO 和名为 iSeries Access for Linux 的 UnixODBC 驱动程序使连接池工作.
I am trying to get connection pooling working using PHP/PDO with a UnixODBC driver called iSeries Access for Linux.
我没有在我的 PDO 构造函数中设置 PDO::ATTR_PERSISTENT,因为我想使用池而不是持久性(我在 PHP-CGI 环境中).
I do not set the PDO::ATTR_PERSISTENT in my PDO constructor as I want to use pooling and not persistence (I am in a PHP-CGI environment).
使用 http://www 的连接池"部分.ibm.com/developerworks/systems/library/es-linux_bestpract.html我已经放了
在我的 odbc.ini 和
in my odbc.ini and
在我的 odbcinst.ini 中
in my odbcinst.ini
但是,ODBC 驱动程序似乎不是连接池,因为每次页面刷新都会生成与正在建立的传入连接相关的 CPIAD09 消息.
However, it seems that the ODBC driver is not connection pooling because every page refresh generates the CPIAD09 related message of an incoming connection being made.
这是我的完整 ODBC 配置文件:
Here are my full ODBC configuration files:
和
推荐答案
这需要在您的 odbcinst.ini 而不是您的 odbc.ini 文件中的 [ODBC] 下进行
This needs to go under [ODBC] in you odbcinst.ini and NOT your odbc.ini file
把它放在你的 odbc.ini 中
Put this in your odbc.ini
这篇关于如何使连接池在 PHP-CGI PDO iSeries Access UnixODBC 连接上工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!