简体   繁体   English

在Oracle的CentOS中未定义Oci_connect函数

[英]Oci_connect function is undefined in CentOS with Oracle

oracle database connectivity issue in php with oci_connect function is undefined on linux centOs 7 follows this article too. 在php中,带有oci_connect函数的oracle数据库连接问题在linux centOs 7上也是未定义的。 Centos 6 PHP OCI8 extention is not working (Undefined function oci_connect()) Centos 6 PHP OCI8扩展无法正常工作(未定义函数oci_connect())

Not found perfect solution for this. 找不到完美的解决方案。

You need install [OCI8] extension in php.ini: 您需要在php.ini中安装[OCI8]扩展名:

Install both RPM packages: 安装两个RPM软件包:

rpm -ivh instantclient-basic-linux.XXX.rpm
rpm -ivh instantclient-sdk-linux.XXX.rpm

Install some prerequisite: 安装一些先决条件:

yum install php-pear
yum install php-devel

Download the OCI8 extension: 下载OCI8扩展:

pear download pecl/oci8
tar xvzf oci8-1.4.7.tgz
cd oci8-1.4.7/
phpize

Configure the extension with your Oracle client library path (change the path …/11.2/… with your own version): 使用您的Oracle客户端库路径配置扩展(使用您自己的版本更改路径…/ 11.2 /…):

./configure --with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client64/lib/

Compile and install: 编译安装:

make
make install

Now enable extension in php.ini 现在在php.ini中启用扩展

cd /etc/php.ini

And do to the following line: 并执行以下行:

[OCI8]

and enable extension: 并启用扩展:

;extension=oci8.so

to

extension=oci8.so

And restart server service: 并重新启动服务器服务:

service apache2 restart

or 要么

service httpd restart

You have oci_connect () defined. 您已定义oci_connect()。

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

相关问题 Oracle 11g调用未定义的函数oci_connect() - Oracle 11g Call to undefined function oci_connect() 调用未定义函数 oci_connect() - Call to undefined function oci_connect() PHP8 + Oracle OCI8 => 致命错误:未捕获错误:调用未定义的函数 oci_connect() - PHP8 + Oracle OCI8 => Fatal error: Uncaught Error: Call to undefined function oci_connect() apache / php / oracle db / raspbian:调用未定义函数oci_connect() - apache / php / oracle db / raspbian: Call to undefined function oci_connect() PHP中的Oracle连接错误。 致命错误:调用未定义函数oci_connect() - Oracle Connection Error in PHP. Fatal error: Call to undefined function oci_connect() 致命错误:调用未定义的函数 oci_connect() php 错误 - Fatal error: Call to undefined function oci_connect() php error 致命错误:调用Wamp中未定义的函数oci_connect() - Fatal error: Call to undefined function oci_connect() in Wamp 致命错误:调用未定义函数oci_connect() - Fatal error: Call to undefined function oci_connect() 在Heroku应用中调用未定义的函数oci_connect() - Call to undefined function oci_connect() in Heroku app 使用XAMPP阻止调用未定义的函数oci_connect() - Stuck Call to undefined function oci_connect() using XAMPP
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM