Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Programming \ Mac OS X 10.9 compiler OCI8 module     - SSH service configuration to use a certificate login Linux server (Server)

- Linux FTP setting file description (Server)

- How Vim playing a mature IDE (Linux)

- Analysis of MySQL High Availability (Database)

- RedHat virtual machine to install VMware Tools (Linux)

- DVD production using CentOS installation source within the company Yum (Linux)

- VirtualBox virtual machine can not start to solve under Ubuntu (Linux)

- C ++ virtual functions Classic Insights (Programming)

- Oracle 11g maintenance partitions - Adding Partitions (Database)

- Windows and Ubuntu dual system, repair of two ways UEFI boot (Linux)

- CRF ++ Linux use (Linux)

- PPA on Ubuntu Linux installation Plank 0.8.0 (Linux)

- MongoDB Study Notes (1) - Install MongoDB on Windows systems (Database)

- Understanding Java classes (Programming)

- Installation and Configuration JDK8 In CentOS 7 (Linux)

- 10 Regulation of painless SQL Schema (Database)

- Java in the final qualifier (Programming)

- MySQL tmpdir parameter modification (Database)

- Oracle ORA-01691 error message, a single data file size limit problem (Database)

- Linux kernel source code analysis (Linux)

  Mac OS X 10.9 compiler OCI8 module
  Add Date : 2018-11-21      
  This article is the author's previous record, although Mac OS X 10.9 version, but should also be perfectly successful in 10.10 on

Recent queries the library to do the conversion php, write Oracle last time because there is no intermediate layer oci8 modules and oracle instance, the hand-write code without debugging, the workload of some huge, so take some time to install the module oci8 convenient debugging php.

php by dynamically loading dynamic link library to use various php extension. Whether or mysql gd graphics library, it is in the form of dynamic link libraries released. I first baidu a bit, Mac users who want to use oracle's plenty of money, but most programs are given recompile php. Many people do not even have Mac comes with apache2 and php, directly to compile apache and php, I personally do not agree to do so. Since he has given you done php and apache, then this is probably the most will not go wrong. So I will not use, ready to select the compiled .so form to load.

But look more than an hour, so compiled module almost no articles, even if there are also articles compiled by macport, brew and other third-party software packages, and other downloads zlib library files to compile, personal spiritual cleanliness issue, this not in the way selection list.

Since the Internet is no, then I'll take a look official documentation php and the oracle. But the oracle there wrote a very long-winded, but still have to install oracle11g, php there'd find an article on the dynamic link library module compiled stuff.

There are three methods

Recompile the entire php,. / Configure --with-oci8 = shared
In the form of dynamic link library
As static link library
La miles winded to say a bunch, in fact, specifically compiled oci8.so then loaded in php.ini.

Search on google for a moment there is such a foreign site actually has an article about the compilation oci8

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 (64-bit) ":


In fact, it is to download Oracle official instantclient, according to the basic file and dylib sdk header files to compile, as the second sqlplus is an afterthought, to connect oracle database independent, I certainly Official Download 10g impossible to download the client directly downloaded 11g of instantclient.

Below Open a terminal, copy the necessary files to the system directory.

sudo cp instantclient_11_2 / sdk / include / *. h / usr / include (the / usr / include folder is a command-line tool to install Xcode after some)
sudo cp instantclient_11_2 / sqlplus / usr / bin (In fact, this is the installation of sqlplus client, in fact, does not get to be a)
sudo cp instantclient_11_2 / *. dylib / usr / lib
sudo cp instantclient_11_2 / *. dylib. * / usr / lib (which is actually copied lib DLL)

# The following to / usr / lib directory to be a symbolic link
sudo ln -s libclntsh.dylib.10.1 libclntsh.dylib
Next download compiler oci8, in fact, this can be used to automate pecl complete. But you have Xcode installed autoconf and command-line tools, autoconf I was directly compiled and installed, the Baidu search on the line, Xcode command line tools I had installed was upgraded when the results of 10.8-10.9 kill, so only and then install it again, I was later compiler error, view the information and found that the lack of header files, then wondered, are placed in / usr / include how the missing, the original command-line tools include folder was blown away. Only then reinstall it.

With pecl very automated

sudo pecl install oci8
Then prompted:

Please provide the path to the ORACLE_HOME directory.
Use'instantclient, / path / to / instant / client / lib '
if you're compiling with Oracle Instant Client [autodetect]:
This is to provide you with dynamic link library catalog instantclient meaning
Direct input instantclient, / usr / lib and then translated well oci8.so
If there is no pecl, then manually download the source code oci8:


Unzip the zip file into the directory

./configure --with-oci8 = shared, instantclient, / usr / lib to see where we all understand, in fact, and pecl like to provide you with the lib file directory location
make install
Then open /etc/php.ini in paragraphs extension plus extension = oci8.so on the line, restart apache using phpinfo function can see oci8 been successfully loaded.
- Using Lua implement various operations list (Programming)
- CentOS 6.6 running level (Linux)
- Oracle Data File Management (Database)
- Ubuntu 14.04 / Linux Mint 17 How to install the MintMenu 5.5.2 menu (Linux)
- Replace element and non-replaced elements of learning (Programming)
- AngularJS notes --- Data Binding (Programming)
- Debian SSD ext4 4K aligned (Linux)
- How to ensure that the Internet will not be attacked (Linux)
- PLSQL Developer synchronization table tools (Database)
- Ubuntu 15.04 installed JDK and configured as the default JDK (Linux)
- VirtualBox modify the size of the virtual machine disk VDI (Linux)
- Neo4j map data processing tab (Database)
- Ubuntu uses conky add desktop control (Linux)
- Nginx high concurrency optimization ideas (Server)
- Depth understanding of C language (Programming)
- Use value type build better applications Swift (Programming)
- Ubuntu Gnome and Fedora 22 Gnome desktop, extended to achieve global menu (Linux)
- Node.JS different ways to install under Ubuntu 15.04 (Linux)
- C # C ++ Java interface type conversion (Programming)
- Mahout source code analysis: FP-Growth algorithm parallelization (Programming)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.