I'm trying to install OCI8 on a RedHat Server (RHEL7) for my Apache Server. At this moment, when I try to connect to my server with Symphony, I get this error:
Exception "ErrorException" : Use of undefined constant OCI_COMMIT_ON_SUCCESS - assumed 'OCI_COMMIT_ON_SUCCESS'
Here is what I did to install OCI8.
- Installation of oracle-instantclient11.2 RPMs (devel and basic).
- Installation of the OCI8 package :
For information, I already have an Oracle 12C on my server but I want to connect my PHP application to another server (Oracle 11GR2).
tar zxvf oci8-2.1.7.tgz
cd oci8-2.1.7
phpize
./configure --with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client64/lib --with-php-config=/opt/rh/rh-php56/root/usr/bin/php-config
make
make install
- Edit php.ini in order to add
extension=oci8.so
.
I found this thread and I tried to used oci_connect
and I get this error:
Fatal error: Call to undefined function oci_connect()
How can I correct this problem?
EDIT: I just found this error in php_error.log:
[26-Sep-2017 16:14:12 Europe/Paris] PHP Warning: PHP Startup: Unable to load dynamic library '/opt/rh/rh-php56/root/usr/lib64/php/modules/oci8.so' - /opt/rh/rh-php56/root/usr/lib64/php/modules/oci8.so: undefined symbol: _emalloc_128 in Unknown on line 0