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...