在CentOS Linux版本7.2.1511Core中安装PHP 7.4.1,oracleclient和oci8

问题描述

我正在尝试安装PHP 7.4.1,oracleclient和oci8以实现oracle连接。我在各种论坛上尝试了所有可能的解决方案,但没有运气。 系统:CentOS Linux版本7.2.1511(核心)

[root@localhost ~]# rpm -qa|grep PHP
PHP-common-7.4.10-1.el7.remi.x86_64
PHP-pecl-mcrypt-1.0.3-1.el7.remi.7.4.x86_64
PHP-process-7.4.10-1.el7.remi.x86_64
PHP-opcache-7.4.10-1.el7.remi.x86_64
PHP-xml-7.4.10-1.el7.remi.x86_64
PHP-devel-7.4.10-1.el7.remi.x86_64
PHP-sodium-7.4.10-1.el7.remi.x86_64
PHP-pdo-7.4.10-1.el7.remi.x86_64
PHP-pear-1.10.12-2.el7.remi.noarch
PHP-cli-7.4.10-1.el7.remi.x86_64
PHP-MysqLnd-7.4.10-1.el7.remi.x86_64
PHP-json-7.4.10-1.el7.remi.x86_64
PHP-gd-7.4.10-1.el7.remi.x86_64
PHP-oci8-7.4.10-1.el7.remi.x86_64
PHP-fedora-autoloader-1.0.1-2.el7.noarch
PHP-7.4.10-1.el7.remi.x86_64
[root@localhost ~]# 


[root@localhost ~]# rpm -qa|grep oracle
oracle-instantclient18.3-sqlplus-18.3.0.0.0-3.x86_64
oracle-instantclient18.3-basic-18.3.0.0.0-3.x86_64
oracle-instantclient18.3-jdbc-18.3.0.0.0-3.x86_64
oracle-instantclient18.3-devel-18.3.0.0.0-3.x86_64
[root@localhost ~]# 

[root @ localhost〜]#vi .bash_profile

.bash_profile

获取别名和函数

if [-f〜/ .bashrc];然后 。 〜/ .bashrc fi

用户特定的环境和启动程序

PATH = $ PATH:$ HOME / bin

导出路径

[root@localhost ~]# vi .bashrc vi .bashrc
# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global deFinitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi
ORACLE_HOME=/usr/lib/oracle/18.3/client64
export ORACLE_HOME




[root@localhost ~]# vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
ORACLE_HOME=/usr/lib/oracle/18.3/client64
export ORACLE_HOME

我是系统的初学者。任何帮助都非常感激

解决方法

使用我的存储库,您需要最新的Oracle Client Library版本 19.8 (不是18.3)

$ rpm -qi php-oci8
...
The php-oci8 packages provides the OCI8 extension version 2.2.0
and the PDO driver to access Oracle Database.

The extension is linked with Oracle client libraries 19.8
(Oracle Instant Client).  For details,see Oracle's note
"Oracle Client / Server Interoperability Support" (ID 207303.1).

You must install libclntsh.so.19.1 to use this package,provided
in the database installation,or in the free Oracle Instant Client
available from Oracle.
...

这在Installation of Oracle extensions for PHP

中有详细解释

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...