oci8,php7和Oracle 10.1兼容性 [英] oci8, php7 and Oracle 10.1 compatibility

查看:264
本文介绍了oci8,php7和Oracle 10.1兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须将系统从php5.6升级到php7.2.系统使用oracle 10.1数据库.

I have to upgrade a system from php5.6 to php7.2. The system uses an oracle 10.1 database.

现在,我试图收集所有信息,但是对于phpoci8instant client与数据库之间的兼容性仍然感到困惑.

Now I tried to collect all infos but am still confused about the compatibility between php, oci8, instant client and the database.

我读到,用php7至少必须安装oci8 2.1,但这不适用于oracle 10.1.

I read, that with php7 I have to at least install oci8 2.1, but this doesn't work with oracle 10.1.

对吗?

还是可以通过oracle 10.1运行php7?

Or is it possible to run php7 with oracle 10.1?

请赐教我:)

推荐答案

我读到,必须使用php7至少安装oci8 2.1,但这不适用于oracle 10.1.

I read, that with php7 I have to at least install oci8 2.1, but this doesn't work with oracle 10.1.

对吗?

不.从手册:

OCI8 2.0需要Oracle 12c,11g或10g客户端库,并将从PHP 5.2开始安装.

OCI8 2.0 requires Oracle 12c, 11g or 10g client libraries and will install on PHP 5.2 onwards.

请注意,您使用的Oracle客户端版本不需要与服务器版本匹配.在同一手册页中(为了便于阅读,将其重新格式化为项目符号):

Note that the Oracle client version you use doesn't need to match the server version. From the same manual page (reformatted into bullet points for ease of reading):

  • 如果OCI8使用9iR2客户端库,则PHP可以连接到Oracle Database 8i,9iR2、10g或11g.
  • 如果OCI8使用10gR2客户端库,则数据库可以是9iR2、10g,11g或12c.
  • 如果OCI8使用11g客户端库,则数据库可以是9iR2、10g,11g或12c.
  • 如果OCI8使用12c客户端库,则数据库可以是10gR2、11g或12c.
  • If OCI8 uses 9iR2 client libraries, then PHP can connect to Oracle Database 8i, 9iR2, 10g or 11g.
  • If OCI8 uses 10gR2 client libraries, the database can be 9iR2, 10g, 11g or 12c.
  • If OCI8 uses 11g client libraries, the database can be 9iR2, 10g, 11g or 12c.
  • If OCI8 uses 12c client libraries, the database can be 10gR2, 11g or 12c.

因此,只有最后一种情况(12c客户端库)需要的数据库版本大于10.1.

So only the last scenario (12c client libraries) requires a database version greater than 10.1.

无论手册说什么,我都强烈建议您建立一个测试实例,看看是否有任何问题.

Regardless of what the manual says, I would strongly recommend building a test instance and seeing if you have any issues.

修改: OCI8程序包PECL页面的进一步信息:

适用Oracle的标准跨版本连接.例如, 与Instant Client 11.2链接的PHP OCI8可以连接到Oracle 从数据库9.2开始.请参见Oracle的注释"Oracle客户端/服务器 有关详细信息,请参见互操作性支持"(ID 207303.1).

Oracle's standard cross-version connectivity applies. For example, PHP OCI8 linked with Instant Client 11.2 can connect to Oracle Database 9.2 onward. See Oracle's note "Oracle Client / Server Interoperability Support" (ID 207303.1) for details.

这篇关于oci8,php7和Oracle 10.1兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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