My current project involves using PHP with an Oracle database. Oracle apparently embraces PHP warmly and as such supports an open source database driver for the environment called OCI8. As a Mac user I was looking to use OS X's built-in Apache and PHP setup, which like many PHP installations does not have the Oracle OCI8 driver installed or enabled. It took me some time and research to get it up and running. I was using Oracle Express, a limited capability, free-ish version of Oracle's database. Oracle Express was installed on a separate Windows machine as it cannot run or be installed on Snow Leopard. I also assume that you enabled PHP in your Apache configuration (/etc/apache2/httpd.conf
) and have a /etc/php.ini
by copying it from /etc/php.ini.default
.
OCI8 relies on OS X having several client libraries and tools from Oracle installed on OS X. For most intents and purposes download the 64-bit version of the following files under the title "Version 10.2.0.4 (64-bit)":
- instantclient-basic-10.2.0.4.0-macosx-x64.zip
- instantclient-sqlplus-10.2.0.4.0-macosx-x64.zip
- instantclient-sdk-10.2.0.4.0-macosx-x64.zip
Registration is required for all downloads.