I am using Centos 6 64 bit OS. Recently i have installed OCI8 extension with php. After making all configuration i tried to execute the function oci_connect to connect with a Oracle Database remotely.
Unfortunately i got this error:
Fatal error: Call to undefined function oci_connect() in /var/www/html/index.php on line 5
I have installed oci8 like this:
OCI8
Download the OCI8 source using pear
$ pear download pecl/oci8 $ tar -xvf oci8-1.4.9.tgz $ cd oci8-1.4.9
Build and install the extension.
$ phpize $ ./configure --with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client64/lib $ make $ sudo make install
To enable the extension, add a file named oci8.ini in /etc/php.d with this content:
extension=oci8.so
Validate that it was successfully installed.
$ php -i | grep oci8
You should see something like this:
/etc/php.d/oci8.ini, oci8 oci8.connection_class => no value => no value oci8.default_prefetch => 100 => 100 oci8.events => Off => Off oci8.max_persistent => -1 => -1 oci8.old_oci_close_semantics => Off => Off oci8.persistent_timeout => -1 => -1 oci8.ping_interval => 60 => 60 oci8.privileged_connect => Off => Off oci8.statement_cache_size => 20 => 20
Ref: http://shiki.me/blog/installing-pdo_oci-and-oci8-php-extensions-on-centos-6-4-64bit/
I would like to mention that when the installation started is message was display something like: instantclient, /../../ to PUT THE PATH. I didn't give anything, just pressed enter. Is it the issue that i can't connect to Oracle ?
Need your help badly.
Thanks