In this tutorial, I’ll show you how to connect PHP to an Oracle database on Windows using XAMPP.
Unlike MySQL, Oracle is not supported by default in PHP — so we’ll go step by step to set everything up properly.
💻 What you’ll learn:
Install Oracle Instant Client
Configure Windows environment variables
Find your PHP version using `phpinfo()`
Download the correct Oracle DLL from PHP
Enable `oci8` extension in php.ini
Test Oracle connection using PHP
00:00 – Introduction and Requirements (XAMPP / PHP server)
00:19 – Step 1: Download Oracle Instant Client
00:41 – Step 2: Set Environment Variables (Path)
01:10 – Step 3: Download PHP OCI8 DLL
01:18 – Check your PHP version (phpinfo)
01:35 – Choose correct DLL version
01:52 – Step 4: Copy DLL files to php/ext
02:01 – Step 5: Configure php.ini (enable oci8)
02:46 – Step 6: Restart XAMPP server
02:56 – Common error: undefined function oci_connect
Download Oracle instant client :
https://www.oracle.com/database/techn...
Download correct OCI8 DLL
https://pecl.php.net/package/oci8
⚠️ Common error fix included:
If you see `Call to undefined function oci_connect()`, I’ll show you how to fix it.
This guide works for:
Windows 10
Windows 11
Perfect for students, developers, and anyone working with Oracle + PHP integration.
👉 Don’t forget to LIKE and SUBSCRIBE for more coding tutorials!
php oracle connection, connect php to oracle, xampp oracle setup, php oci8 tutorial, oracle instant client php, php windows tutorial, php database connection, oci_connect error fix, xampp php setup, oracle database tutorial, php backend tutorial, web development guide
#PHP #Oracle #XAMPP #WebDevelopment #Programming #Database #CodingTutorial #Windows #Backend #TechTutorial