I am trying to install OCI8 for Apache / PHP 7.0 in Debian 4.9.65-3.
Based on a myriad of advice that I have found with Google, none of which exactly solves my problem, I have tried the following:
apt-get install libaio1
aptitude install alien
(download the below-mentioned stuff from Oracle website)
rpm -Uvh oracle-instantclient-basic-10.2.0.5-1.x86_64.rpm
rpm -Uvh oracle-instantclient-devel-10.2.0.5-1.x86_64.rpm
locate libnnz10.so
The command returns this answer:
/usr/lib/oracle/10.2.0.5/client64/lib/libnnz10.so
nano /etc/apache2/envvars
append the file with these rows:
export LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.5/client64/lib
export ORACLE_HOME=/usr/lib/oracle/10.2.0.5/client64
/etc/init.d/apache2 restart
pecl install oci8
We get an error message:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/oci8.so' - libnnz10.so: cannot open shared object file: No such file or directory in Unknown on line 0
We continue anyway. When asked about the path to the ORACLE_HOME directory, we say:
instantclient,/usr/lib/oracle/10.2.0.5/client64/lib
nano /etc/php/7.0/apache2/php.ini
under the row [OCI8] we add a new row:
extension=oci8.so
nano /etc/php/7.0/cli/php.ini
under the row [OCI8] we add a new row:
extension=oci8.so
/etc/init.d/apache2 restart
Now we test the command oci_connect() in PHP. We get the error message:
Fatal error: Uncaught Error: Call to undefined function oci_connect() in /var/www/html/db_connections.php
php -i |grep oci8
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/oci8.so' - libnnz10.so: cannot open shared object file: No such file or directory in Unknown on line 0
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
OCI8 for php 7.0
-
- Posts: 2
- Joined: 2018-06-12 10:43
Re: OCI8 for php 7.0
I am aware of that thread. It does not list my error message, so the situatin is a bit different there, neither does anything listed in that discussion solve my problem.
A detail that was mentioned in that discussion is providing the full path in config files:
nano /etc/php/7.0/apache2/php.ini
[OCI8]
=>
[OCI8]
extension=oci8.so
extension=/usr/lib/php/20151012/oci8.so
nano /etc/php/7.0/cli/php.ini
[OCI8]
=>
[OCI8]
extension=oci8.so
extension=/usr/lib/php/20151012/oci8.so
/etc/init.d/apache2 restart
Now I tried that too. It didn't help or change my situation in any way.