3
I have a CentOS environment running as a VM guest. It runs and Oracle 12.1 Database, along with PHP 5.4.16, on Apache 2.0.
I've gone through the installation steps to ensure that the correct OCI drivers are installed. I'm running version 2.0.10, as instructed here: here >>, and pointed it towards the correct $ORACLE_HOME
.
As you see from the phpinfo()
screen, the oci extension appears to be loading from the extensions directory:
However, there is no corresponding OCI8 entry in the remainder of the phpinfo()
page (as is described here>>).
The contents of /etc/php.d/oci8.ini
is as follows:
; Created by me: 2016-02-08
extension=oci8.so
My extensions directory is:
And the files in this directory appear to be correct, regarding privileges and SELinux context (as you see here):
When I load my index.php
file in a browser, it appears to be loading mainly successfully, except for the fact that any reference to OCI code (variables, constants, functions) are erroring (meaning, of course, that the extension has not been registered inside PHP):
Does anyone have an idea as to what I should do to correctly register the OCI8 extension inside PHP?
=== EDIT / SOLUTION?? ===
I switched off SELinux (see this how-to), and suddenly OCI seemed to work. It's not an ideal solution by any means, since it renders the whole OS more vulnerable. But it will do for my requirements at the moment.
On the other hand, if anyone knows how to enable SELinux, and get it to work with OCI8, your comments would be much appreciated!