thclpr
thclpr

Reputation: 5938

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.

Upvotes: 6

Views: 33975

Answers (6)

Hidaya Sekkal
Hidaya Sekkal

Reputation: 21

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.

Upvotes: 2

alexkb
alexkb

Reputation: 3356

Possibly quite obvious to some, but wasn't initially for me: if you're still seeing this The specified procedure could not be found. in Unknown on line 0 error, even after installing the instant client, SDK, and so on - make sure you put the Oracle instant client path in your system "PATH" variable, not the user variable, as user obviously doesn't get used when Apache runs. You can verify that the instant client path is set properly by reviewing the PATH value shown in your phpinfo() output.

Upvotes: 1

Swadesh
Swadesh

Reputation: 651

I found the main cause behind this issue is the oci8 driver version of oracle. Finally i was able to connect to oracle and the steps i described here at http://angularcode.com/connecting-php-to-oracle-database-10g/

Upvotes: 0

ivarrian
ivarrian

Reputation: 137

For me, this was caused by not having the Visual C++ Redistributable for Visual Studio 2008 SP1 (for VC9) installed. I had to get the x64 package as I'm running Windows 7 64bit. Hopefully this helps someone with the same problem. After installing it, PHP no longer reported those errors.

Upvotes: 1

Dwayne Driskill
Dwayne Driskill

Reputation: 1490

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.

Upvotes: 2

thclpr
thclpr

Reputation: 5938

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

Upvotes: 7

Related Questions