Unable to get php_oci8_12c.dll to load

First off, let me start of with my environment:

Windows 2008 R2 - 64 bit
IIS 7.0

PHP 5.6.2 - Non Thread Safe - 64 bit
Installed at C:\PHP\

Oracle Instant Client 12.1.0.2 - 64 bit
Installed at C:\oracle\instantclient_12_1

Path variables:
%SystemRoot%\system32;
%SystemRoot%;
%SystemRoot%\System32\Wbem;
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;
C:\oracle\instantclient_12_1;
c:\php;
C:\Windows\SysWOW64;
C:\PHP\ext

PHP is working and I can run phpinfo and it shows all is working, however oci does not load and I am unable to connect to Oracle in my code.

When starting PHP in the command line, I am getting this error:

PHP Warning: PHP Startup: Unable to load dynamic library ‘C:\PHP\ext\php_oci8_12c.dll’ - %1 is not a valid Win32 application. in Unknown on line 0

I have gone through about 5 hours of searching on the web and trying various things, but with no luck. I am hoping there is someone out there that can help.

Try installing the 32 bit version of oracle - I know you don’t want to. But you should do it and see if it clears up the issue.

I’m facing the same issue, I’m using the 32 bit PHP and rest all the configuration is same.

Sponsor our Newsletter | Privacy Policy | Terms of Service