This article shows you how to configure your XAMPP with Oracle extension on Windows.
Not like Linux or Mac OS, To connect Oracle database in Windows system, you need Oracle client DLL for Windows to connect Oracle database. XAMPP did come with Oracle client libraries, so you have to instal it manually.
Enable Oci dll in php.ini
uncomment the php.ini line
there may have more than one “php_oci” like extension, but ONLY ONE of these DLLs may be enabled at a time.
But if you restart Apache now, then you will got errors like “oci.dll is missing”, so our work is not done yet.
Install Oracle Instant Client
Oracle Instant Client is free, light-weight Oracle Database libraries and SDKs.
Click proper download link for your OS, please note, since your xampp installed 32bit php, so you have download 32bit release, otherwise, the oci8.dll will not working properly.. You will download a zip file, which need to unzip to a certain directory, which indicated by XAMPP phpinfo. Like below, you need unzip the instant client into path=c:\php-sdk\oracle\x86\instantclient_12_1
Set Windows system PATH
The last step, you have to set path c:\php-sdk\oracle\x86\instantclient_12_1 into Windows system PATH environment variable, so PHP can access all these .dll files.
You can use command line to do this. But it may distroy other settings. So here is a safeway to do that (Window 7):
click the Start button, right-click the Computer option in the Start menu, and select Properties.
Click the Advanced System Settings link in the left column.
In the System Properties window, click on the Advanced tab, then click the Environment Variables button near the bottom of that tab.
In the Environment Variables window (pictured below), highlight the Path variable in the “System variables” section and click the Edit button. Add or modify the path lines with the paths you want the computer to access. Each different directory is separated with a semicolon.
Note: you need admin permission to do PATH change.
Now, you have complete the Oracle extension installed on your computer, you can now restart XAMPP to make it applied.