PHP:OCI Installation

Source: Internet
Author: User
OCI8 is a PHP support module for Oracle database
Before installing OCI8, you need to install Oracle's client library files
Instant Client package? Basic
and Instant Client package? Sdk
The most convenient way to install all the required files is to use the Oracle Instant Client, which can be obtained from here: http://www.oracle.com/technology/tech/oci/instantclient/ Instantclient.html. For the OCI8 module to work, the "basic" version of the Oracle Instant Client is sufficient. The Instant Client does not require ORACLE_SID or oracle_home environment variables to be set. But you might want to set Ld_library_path and Nls_lang.

RPM-IVH oracle-instantclient-basic-11.1.0.1-1.i386.rpm
Vi/etc/ld.so.conf.d/oracle-lib.conf
The contents are as follows
/usr/lib/oracle/11.1.0.1/client/lib
Run
Ldconfig

RPM-IVH oracle-instantclient-devel-11.1.0.1-1.i386.rpm

Determine the Apache support for Pthread
ldd/usr/sbin/httpd | grep libpthread
If not supported, you need to recompile Apache
UnixWare will not support Libpthread, but support Libthread

Enter the PHP code in the Ext/oci8 directory
/usr/local/php/bin/phpize
./configure with-php-config=/usr/local/php/bin/php-config? with-oci8=/usr/lib/oracle/11.1.0.1/client/
cp/usr/include/oracle/11.1.0.1/client/*./
Make
Make install
Copy the oci8.so to PHP extension_dir
and add support in the configuration file

FAQ:
Q:configure times wrong: Checking Oracle version ... configure:error:oracle-oci8 needed libraries not found
A:./configure with-php-config=/usr/local/php/bin/php-config? with-oci8=/usr/lib/oracle/11.1.0.1/client/

Error when Q:make
A: Missing Oracle-instantclient-devel

?
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.