Di Ubuntu 16.04, menggunakan PHP 5.6, dengan os 64bit, coba ini:
Instal paket:
sudo apt-get install php5.6-dev build-essential php-pear libaio1
Unduh paket versi terbaru dari:
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
Cari paket-paket ini, sesuai dengan versi terbaru:
oracle-instantclientXX.X-basic-XX.X.X.X.X-X.x86_64.rpm
oracle-instantclientXX.X-devel-XX.X.X.X.X-X.x86_64.rpm
Mengonversi paket:
sudo apt-get install alien
sudo alien oracle-instantclientXX.X-basic-XX.X.X.X.X-X.x86_64.rpm
sudo alien oracle-instantclientXX.X-devel-XX.X.X.X.X-X.x86_64.rpm
Memasang:
sudo dpkg -i oracle-instantclientXX.X-basic_XX.X.X.X.X-X_amd64.deb
sudo dpkg -i oracle-instantclientXX.X-devel_XX.X.X.X.X-X_amd64.deb
Menginstal oci8:
sudo pecl install oci8-2.0.12
*Build process completed successfully
Installing '/usr/lib/php/20131226/oci8.so'
install ok: channel://pecl.php.net/oci8-2.0.12
configuration option "php_ini" is not set to php.ini location
You should add "extension=oci8.so" to php.ini*
Tambahkan ekstensi ke php:
sudo gedit /etc/php/5.6/apache2/php.ini
tambahkan ekstensi:
extension=oci8.so
Mulai ulang apache:
sudo service apache2 restart
Itu dia.