Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm tring to use oci_connect() function, but get error:

PHP Fatal error:  Call to undefined function oci_connect() in ...

I unzipped Instant Client to "C:\instantclient_11_2" and updated system PATH. I'm uncommented


line in php.ini file, and rebooted web server.
This is Configuring Command from phpinfo():

cscript /nologo configure.js "--enable-snapshot-build" "--disable-isapi" "--enable-debug-pack" "--disable-isapi" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=D:\php-sdk\oracle\instantclient11\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet" "--with-mcrypt=static"

I see that path in --with-oci8 is incorrect, but I don't know where I change it, and whether it is what I need to do.
Also there is no string "OCI8 Support enabled" in phpinfo output.

Is there some solution?

share|improve this question
up vote 0 down vote accepted

The solution was to define: extension_dir in php.ini

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.