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
http://www.bkjia.com/PHPjc/958568.htmlwww.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...