Php - Oracle (OCI Installation)

Card Puncher Data Processing

About

This page is showing how to install an Oracle drivers OCI

Steps for php at the command line

  • Get an 32 bit instant client zip file the instant client page. Because Windows PHP is 32 bit, the 32 bit version of Instant Client is needed.
  • Verify that this a 32bit by reading the file BASIC_README at the root location of the instant client package
Basic Package Information 
========================= 
Mon Feb 13 19:39:46 CST 2017
Client Shared Library 32-bit - 12.2.0.1.0
....

  • Add the instant client path at the first place of the path environment variable and you are good.
#Linux
export PATH=/d/oracle/instantclient_12_2:$PATH
# Windows
set PATH=d:\oracle\instantclient_12_2;%PATH%
  • Uncoment the oci extension in the php.ini file
extension=php_oci8_12c.dll  ; Use with Oracle Database 12c Instant Client
  • All good

Support

Unable to load dynamic library php_oci8_12c.dll

Warning: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_oci8_12c.dll' - %1 is not a valid Win32 application.

Php search in the path the oci.dll and cannot load it because it's a 64 bit file. Download from the instant client page, a 32 windows instant client.







Share this page:
Follow us:
Task Runner