简体   繁体   English

oci8,php7和Oracle 10.1兼容性

[英]oci8, php7 and Oracle 10.1 compatibility

I have to upgrade a system from php5.6 to php7.2 . 我必须将系统从php5.6升级到php7.2 The system uses an oracle 10.1 database. 系统使用oracle 10.1数据库。

Now I tried to collect all infos but am still confused about the compatibility between php , oci8 , instant client and the database. 现在,我尝试收集所有信息,但仍然对phpoci8instant client和数据库之间的兼容性感到困惑。

I read, that with php7 I have to at least install oci8 2.1 , but this doesn't work with oracle 10.1 . 我读到,用php7至少必须安装oci8 2.1 ,但这不适用于oracle 10.1

Is that correct? 那是对的吗?

Or is it possible to run php7 with oracle 10.1 ? 或者是否可以使用oracle 10.1运行php7

Please enlighten me :) 请赐教我:)

I read, that with php7 I have to at least install oci8 2.1, but this doesn't work with oracle 10.1. 我读到,用php7必须至少安装oci8 2.1,但这不适用于oracle 10.1。

Is that correct? 那是对的吗?

No. From the manual : 否。从手册中

OCI8 2.0 requires Oracle 12c, 11g or 10g client libraries and will install on PHP 5.2 onwards. OCI8 2.0需要Oracle 12c,11g或10g客户端库,并将从PHP 5.2起安装。

Note that the Oracle client version you use doesn't need to match the server version. 请注意,您使用的Oracle客户端版本不需要与服务器版本匹配。 From the same manual page (reformatted into bullet points for ease of reading): 在同一手册页中(为了便于阅读,将其重新格式化为项目符号点):

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

So only the last scenario (12c client libraries) requires a database version greater than 10.1. 因此,只有最后一种情况(12c客户端库)需要的数据库版本大于10.1。

Regardless of what the manual says, I would strongly recommend building a test instance and seeing if you have any issues. 无论手册说什么,我都强烈建议您建立一个测试实例,看看是否有任何问题。


Edit: Further information from the OCI8 package PECL page : 编辑:来自OCI8包PECL页面的更多信息:

Oracle's standard cross-version connectivity applies. 适用Oracle的标准跨版本连接。 For example, PHP OCI8 linked with Instant Client 11.2 can connect to Oracle Database 9.2 onward. 例如,与Instant Client 11.2链接的PHP OCI8可以向前连接到Oracle Database 9.2。 See Oracle's note "Oracle Client / Server Interoperability Support" (ID 207303.1) for details. 有关详细信息,请参见Oracle的注释“ Oracle客户端/服务器互操作性支持”(ID 207303.1)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM