1

I'm trying to enable oci8_12c extension with Instant client 12.2 in PHP 8.0.7. on windows x64

  1. I've uncommented extension=oci8_12c in my php.ini file.
  2. Downloaded and placed php_oci8-3.0.1-8.0-ts-vs16-x64 files in my C:\xampp\php\ext folder
  3. Downloaded instantclient-basic-windows.x64-12.2.0.1.0.zip file and extracted to C:\Oracle\instantclient_12_2 also added to PATH.
  4. Downloaded & installed vcredist_x64.exe from Microsoft Visual Studio 2013 Redistributable.
  5. Restarted my PC.

But still when I run php --ini in my cmd. I get the following warning:

PHP Warning:  PHP Startup: Unable to load dynamic library 'oci8_12c' (tried: C:\xampp\php\ext\oci8_12c (The specified module could not be found), C:\xampp\php\ext\php_oci8_12c.dll (The specified module could not be found)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'oci8_12c' (tried: C:\xampp\php\ext\oci8_12c (The specified module could not be found), C:\xampp\php\ext\php_oci8_12c.dll (The specified module could not be found)) in Unknown on line 0
Configuration File (php.ini) Path: 
Loaded Configuration File:         C:\xampp\php\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)

phpinfo() screenshot

Ahsan Zaman
  • 51
  • 2
  • 6

1 Answers1

1

After 3 days of trying and failing I found this article by Daniel Opitz.

The step I was missing in my question post was

Copy all *.dll files: to c:\xampp\php

Copy all *.dll files to c:\xampp\apache\bin (We need a second copy here for apache)

Thats it !! After adding the .dll files to my root php and apache, the warning was resolved.

Ahsan Zaman
  • 51
  • 2
  • 6