在我的linux服务器上安装oracle即时客户端有问题。我已经坚持了5天了。我遵守了教程,但仍然没有起作用。
https://medium.com/@azharnian/cara-install-oci8-php-7-di-centos7-851abbb5d15
https://gist.github.com/Yukibashiri/cebaeaccbe531665a5704b1b34a3498e
我已经成功地在服务器上安装了apache、php和mariaDB。我在服务器上运行我的php和laravel没有问题。
但是当我安装oracle即时客户端时,我注意到oci8.so/usr/lib64 64/php/中缺少。当我运行命令pear download pecl/oci8错误时,如下所示。
PHP Warning: PHP Startup: Unable to load dynamic library 'oci8.so' (tried: /usr/lib64/php/modules/oci8.so (/usr/lib64/php/modules/oci8.so: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/oci8.so.so (/usr/lib64/php/modules/oci8.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
ldap
libxml
mbstring
mcrypt
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache我如何在我的php模块中安装oci8.so?我怎样才能检查我的OCI状态。
感谢有人能帮我解决这个问题。非常感谢。
发布于 2021-04-23 13:09:52
https://linux.uits.uconn.edu/2020/03/06/php-and-oci8-installation-for-rhel8/这个链接是关于如何安装oci8的一步一步的
dnf install oracle-instantclient18.5-basic-18.5.0.0.0-3.x86_64.rpm oracle-instantclient18.5-devel-18.5.0.0.0-3.x86_64.rpm oracle-instantclient18.5-sqlplus-18.5.0.0.0-3.x86_64.rpmdnf install libnsl rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpmdnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm安装PHP和OCI8:
dnf module list phpdnf module enable php:remi-7.4 -y(如果您收到以下消息:“操作将导致模块'php‘流'7.2’切换为流‘remi-7.4’”)
dnf module reset php (enter “y”)dnf module enable php:remi-7.4 -ydnf install -y php php-cli php-common php-fpm php-pear gcc curl-devel php-devel zlib-devel pcre-devel php-pecl-http systemtap-sdt-develexport PHP_DTRACE=yes
setenforce 0
echo "instantclient,/usr/lib/oracle/18.5/client64/lib" | pecl install oci8-2.2.0.tgz
echo extension=oci8.so >> /etc/php.ini
echo extension=oci8 > /etc/php.d/20-oci8.ini
systemctl restart php-fpm
systemctl restart httpdhttps://stackoverflow.com/questions/63112872
复制相似问题