Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP 5.3.1 not loading php_oci8.dll on Windows

I'm trying to load the oracle extension on php but im having the error:

Warning: PHP Startup: Unable to load dynamic library 'D:\Program Files\xampp\php\ext\php_oci8.dll' - The specified procedure could not be found. in Unknown on line 0

I have done so far:

  1. Included on windows path the the fullpath of oracle instant client
  2. on php.ini, the extension_dir is pointing to the right place
  3. on php.ini extension=php_oci8.dll is ok
  4. restarted the apache, and nothing works.
like image 960
thclpr Avatar asked Oct 10 '12 13:10

thclpr


People also ask

How to load oci8 extension in PHP?

The OCI8 extension can be added to an existing PHP installation by using the » PECL repository. When prompted, enter either the value of $ORACLE_HOME , or instantclient,/path/to/instant/client/lib . Make sure the php. ini directive extension_dir is set to the directory that oci8.so was installed in.


3 Answers

Problem solved by copying the files orannzsbb11.dll , oci.dll and oraociei11.dll to c:\windows\system32

like image 167
thclpr Avatar answered Nov 10 '22 11:11

thclpr


I solved this problem by adding "C:\Program Files (x86)\PHP\v5.3\ext" to my Windows PATH environment variable. You'll just have to remember to change the path if you upgrade PHP. I think this is better than copying dlls which could lead to issues down the road if you end up with multiple dlls with different versions on the same machine.

like image 36
Dwayne Driskill Avatar answered Nov 10 '22 12:11

Dwayne Driskill


You will need to download Oracle Instant client from this hyperlink http://www.oracle.com/technetwork/topics/winsoft-085727.html . Add the path to the instant client on the user environment vriables and the system variables.

like image 28
Hidaya Sekkal Avatar answered Nov 10 '22 10:11

Hidaya Sekkal