CentOS PHP Install Oracle extensions _php tips

Source: Internet
Author: User

Environment

System:centos 6
php:5.3.28

Download Oracle Clients

32-bit system

64-bit system

Copy Code code 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

To perform the installation:

Copy Code code as follows:

# RPM-IVH *.rpm

Download Oracle's PHP extensions

Official Downloads

Copy Code code 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
Copy Code code as follows:

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

Add extension = "oci8.so"

Restart PHP

Copy Code code as follows:

PS aux | grep php | grep root
Kill-user2 Php_root_pid

Related Article

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.