Installing Oracle extensions with PHP under CentOS_PHP tutorial

WBOY
Release: 2016-07-13 10:06:33
Original
1188 people have browsed it

Installing Oracle extensions for PHP under CentOS

This article mainly introduces the installation of Oracle extensions for PHP under CentOS. This article explains the environment, downloading the Oracle client, changing php.ini, and reinstalling Start PHP and other content, friends who need it can refer to it

Environment

System: CentOS 6
PHP: 5.3.28

Download Oracle client

32-bit system

64-bit system

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

Execute installation:

Copy the code The code is as follows:


# rpm -ivh *.rpm
Download Oracle's PHP extension

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
Add extension = "oci8.so"

Restart PHP

The code is as follows:


ps aux | grep php | grep root
kill -USER2 php_root_pid

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/958568.htmlTechArticleInstalling Oracle extensions for PHP under CentOS This article mainly introduces the installation of Oracle extensions for PHP under CentOS. This article explains the environment, Downloading the Oracle client, changing php.ini, restarting PHP, etc. requires...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!