How to install Oracle extension in PHP in CentOS

Source: Internet
Author: User
Install the Oracle extension in PHP in CentOS. This article describes how to install Oracle extensions in PHP under CentOS. This article describes how to install Oracle extensions in PHP under CentOS. ini, restart PHP, and other content. Oracle extensions must be installed in PHP under CentOS.

This article describes how to install the Oracle extension in PHP in CentOS. This article describes the environment, download the Oracle client, change php. ini, and restart PHP. For more information, see

Environment

System: CentOS 6
PHP: 5.3.28

Download the Oracle client

32-bit system

64-bit system

The code is as follows:


Oracle-instantclient-sqlplus-10.2.0.4-1.x86_64.rpm
Oracle-instantclient-jdbc-10.2.0.4-1.x86_64.rpm
Oracle-instantclient-devel-10.2.0.4-1.x86_64.rpm
Oracle-instantclient-basic-10.2.0.4-1.x86_64.rpm

Install:

The code is as follows:


# Rpm-ivh *. rpm


Download the PHP extension of Oracle

The code is as follows:


Wget http://pecl.php.net/get/oci8-2.0.7.tgz
# Tar zxvf oci8-2.0.7.tgz
# Cd oci8-2.0.7
#/Usr/local/php/bin/phpize
#. /Configure -- with-php-config =/usr/local/php/bin/php-config -- with-oci8 = shared, instantclient, /usr/lib/oracle/10.2.0.4/client64/lib/
# Make & make install


Change php. ini

The code is as follows:


# Vi/usr/local/php/etc/php. ini


Added extension = "oci8.so"

Restart PHP

The code is as follows:


Ps aux | grep php | grep root
Kill-USER2 php_root_pid

This article introduces how to install Oracle extensions in PHP in CentOS. This article describes the environment, how to download the Oracle client, how to change php. ini, and how to restart PHP...

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.