• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Fedora 7 / Plesk Onyx : oci8 extension

Erwan

Regular Pleskian
Hello,

Is it possible to have "oci8" extension with Plesk Onyx / PHP7 ?
If yes, how can we activate it?
Thank you.
 
You can install it with following method:

1. Install all needed packages:

# yum install gcc make plesk-php71-devel
# wget http://ftp.riken.jp/Linux/cern/cent...stantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
# wget http://ftp.riken.jp/Linux/cern/cent...stantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
# rpm -ivh oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm

2. Compile module:

# /opt/plesk/php/7.1/bin/pecl install oci8

3. Install compiled oci8 module:

# echo "extension=oci8.so" > /opt/plesk/php/7.1/etc/php.d/oci8.ini
# plesk bin php_handler --reread

4. Check that oci8.so module is loaded:

# /opt/plesk/php/7.1/bin/php -m | grep oci8
oci8
 
Hi Igor,
We must install again oci8, but now:
Plesk Obsedian 18.0.42
Debian 11
PHP FTM 7.4

We did this:
Last instantclicent:
- https://download.oracle.com/otn_sof...antclient-basic-linux.x64-19.14.0.0.0dbru.zip
- https://download.oracle.com/otn_sof...stantclient-sdk-linux.x64-19.14.0.0.0dbru.zip

# mkdir /opt/oracle
# unzip instantclient-basic-linux.x64-19.14.0.0.0dbru.zip
# unzip instantclient-sdk-linux.x64-19.14.0.0.0dbru.zip
# echo /opt/oracle/instantclient_19_14 > /etc/ld.so.conf.d/oracle-instantclient
# ldconfig

Add other packages:
# apt-get install php-dev php-pear build-essential libaio1

Update PECL
#pecl channel-update pecl.php.net

Install the OCI8 extension via PECL
Can not install oci8 with PHP7.4 (error: pecl/oci8 requires PHP (version >= 8.1.0), installed version is 7.4.28)
So:
#echo "instantclient,/opt/oracle/instantclient_19_14" | /opt/plesk/php/7.4/bin/pecl install oci8-2.2.0

Load extension from php.ini
# echo "extension=oci8.so" > /opt/plesk/php/7.4/etc/php.d/oci.ini

# service apache2 restart

See:
#/opt/plesk/php/7.4/bin/php -m | grep oci
PHP Warning: Module 'oci8' already loaded in Unknown on line 0

And the phpinfo() don't have "oci8" module.

I presume the previous error message is from a previously configured call to oci8.
But i don't see "extension call" to oci in the php.ini (7.4), only one call in the /opt/plesk/php/7.4/etc/php.d/oci.ini.

If i delete "extension=oci8.so" fro oci.ini, there is no more error but still no "oci8" module in the phpinfo().

An idea of the problem?
 
Back
Top