PHP7.0及更高版本Informix DB连接器 [英] PHP7.0 & Informix DB connectors

查看:77
本文介绍了PHP7.0及更高版本Informix DB连接器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过php7.0远程连接到Informix数据库 我找到了司机 https://pecl.php.net/package/PDO_INFORMIX/1.3.3

I am trying to connect to an Informix db remotely via php7.0 I've found the driver https://pecl.php.net/package/PDO_INFORMIX/1.3.3

下载了.tar.gz.并提取出来. 通过phpize并运行./configure来准备php文件,如以下所述:

Downloaded the .tar.gz. and extracted it. Prepped the php files via phpize and ran ./configure as explained in:

http://php.net/manual/en/ref.pdo -informix.php

但是,它崩溃并显示以下错误:

However, it crashes with the following error:

检查PDO包括...配置:错误:找不到php_pdo_driver.h.

checking for PDO includes... configure: error: Cannot find php_pdo_driver.h.

我知道PDO已经成为PHP的核心库一段时间了,并且C头文件的命名可能与库中引用的头文件不同.

I know that PDO has been a core PHP lib for a while and probably the C header file is named differently than the one referenced in the lib.

有什么想法可以从这里走吗? 这是非常艰难的一天. 无论如何,安装Informix SDK本身就是一场噩梦.甚至找不到安装目录.

Any ideas where to go from here? It's been a very rough day. Installing the Informix SDK is a nightmare for itself anyway. Can't even find the installation dir.

推荐答案

Informix SDK是IBM精心设计的,专门用来破坏您的一天.

The Informix SDK has been carefully and specifically designed by IBM to ruin your day.

  • 默认情况下,整个集合位于/opt/IBM/informix
  • /opt/IBM/informix/lib/cli/opt/IBM/informix/lib/esql添加到动态链接程序查找路径.在Fedora上,您可以通过将其放入新文件/etc/ld.so.conf.d/informix.conf
  • 中来执行此操作
  • 您需要设置环境变量INFORMIXDIR.在Fedora上,您可以添加一个新文件/etc/profile.d/informix.sh并添加export INFORMIXDIR=/opt/IBM/informix
  • 编辑/opt/IBM/informix/etc/sqlhosts并将您的基本连接信息放在此处.在最简单的情况下,它只有一行读取YOUR_SERVER_NAME\tonsoctcp\tYOUR_DB_NAME\tpdap-np.请注意,pdap-np实际上是端口1526,它也是Informix"Turbo" -Driver tcp端口.查看您的/etc/services.
  • 了解环境变化,例如如果您在全球范围内进行重新启动,则需要重新启动.
  • 我记不清include-dir,但是您可能需要在CFLAGS-I
  • 中使用/opt/IBM/informix/include
  • The whole set lives under /opt/IBM/informix by default
  • Add /opt/IBM/informix/lib/cli and /opt/IBM/informix/lib/esql to your dynamic linker lookup paths. On Fedora you can do this by putting them in a new file /etc/ld.so.conf.d/informix.conf
  • You need to set the environment variable INFORMIXDIR. On Fedora you may add a new file /etc/profile.d/informix.sh and add export INFORMIXDIR=/opt/IBM/informix
  • Edit /opt/IBM/informix/etc/sqlhosts and put your basic connection information there. In the most simple case it has only one line that reads YOUR_SERVER_NAME\tonsoctcp\tYOUR_DB_NAME\tpdap-np. Note that pdap-np is actually port 1526 which is also the Informix "Turbo"-Driver tcp port. See your /etc/services.
  • Get the environment-changes going, e.g. by a reboot if you did them globally.
  • I can't remember the include-dir but you probably need /opt/IBM/informix/include in your CFLAGS's -I

这篇关于PHP7.0及更高版本Informix DB连接器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆