Take the 2-minute tour ×

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
add comment

1 Answer

up vote 0 down vote accepted

The solution was to define: extension_dir in php.ini

share|improve this answer
add comment

Your Answer


