Install Oracle OCI8 for PHP 8.2 Ubuntu 22.04

Install Oracle OCI8 for PHP 8.2 Ubuntu 22.04 

 

Get the link for the latest RPM


https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html

As of 26 March 2023


wget -c https://download.oracle.com/otn_software/linux/instantclient/219000/oracle-instantclient-basic-21.9.0.0.0-1.el8.x86_64.rpm

wget -c https://download.oracle.com/otn_software/linux/instantclient/219000/oracle-instantclient-basiclite-21.9.0.0.0-1.el8.x86_64.rpm

wget -c https://download.oracle.com/otn_software/linux/instantclient/219000/oracle-instantclient-sqlplus-21.9.0.0.0-1.el8.x86_64.rpm

wget -c https://download.oracle.com/otn_software/linux/instantclient/219000/oracle-instantclient-tools-21.9.0.0.0-1.el8.x86_64.rpm

wget -c https://download.oracle.com/otn_software/linux/instantclient/219000/oracle-instantclient-devel-21.9.0.0.0-1.el8.x86_64.rpm

wget -c https://download.oracle.com/otn_software/linux/instantclient/219000/oracle-instantclient-jdbc-21.9.0.0.0-1.el8.x86_64.rpm

wget -c https://download.oracle.com/otn_software/linux/instantclient/219000/oracle-instantclient-odbc-21.9.0.0.0-1.el8.x86_64.rpm

## ===>

apt install alien

### alien -v --scripts

alien -v --scripts oracle-instantclient-basic-21.9.0.0.0-1.el8.x86_64.rpm oracle-instantclient-devel-21.9.0.0.0-1.el8.x86_64.rpm oracle-instantclient-odbc-21.9.0.0.0-1.el8.x86_64.rpm oracle-instantclient-tools-21.9.0.0.0-1.el8.x86_64.rpm oracle-instantclient-basiclite-21.9.0.0.0-1.el8.x86_64.rpm oracle-instantclient-jdbc-21.9.0.0.0-1.el8.x86_64.rpm oracle-instantclient-sqlplus-21.9.0.0.0-1.el8.x86_64.rpm

dpkg -i oracle-instantclient-basic_21.9.0.0.0-2_amd64.deb oracle-instantclient-devel_21.9.0.0.0-2_amd64.deb oracle-instantclient-odbc_21.9.0.0.0-2_amd64.deb oracle-instantclient-tools_21.9.0.0.0-2_amd64.deb  oracle-instantclient-jdbc_21.9.0.0.0-2_amd64.deb oracle-instantclient-sqlplus_21.9.0.0.0-2_amd64.deb

=====>



check for this file with ls command

/etc/ld.so.conf.d/oracle-instantclient.conf

ldconfig

apt install libaio-dev

apt install php8.2-dev php-pear build-essential libaio1

apt install php-pear

pecl channel-update pecl.php.net

pecl install oci8



###===>

Build process completed successfully
Installing '/usr/lib/php/20220829/oci8.so'
install ok: channel://pecl.php.net/oci8-3.2.1
configuration option "php_ini" is not set to php.ini location
You should add "extension=oci8.so" to php.ini

###====>

edit fail /etc/php/8.2/cli/php.ini dan /etc/php/8.2/fpm/php.ini (cari oci8)
extension=oci8.so

===>

### php 7.4 ### pecl install oci8-2.2.0

##===>

oci8.events = On

###====>

Configuring PHP for FAN
With the enhanced OCI8 extension, a php.ini configuration parameter oci8.events allows PHP to be
notified of FAN events:
oci8.events = On
FAN support is only available when PHP is linked with Oracle 10gR2 or 11g libraries and connecting to
Oracle Database 10gR2 or 11g. Review the patches for Oracle bugs 7143299 (fixed in Oracle 11.2.0.1) and
8670389 (fixed in 11.2.0.2) to improve login times in various conditions when using oci8.events

Harisfazillah Jamel ( LinuxMalaysia )

26 March 2023

Popular Posts

Labels

64bit Activity Adempire advocate Akta Apache ASAS Azam backup backuppc Bash Beowulf Big Data Broadband Budget Centos Cinta Cluster CMS cmsfornerd Company Complain computer Computer Operation Conference Contest Data Centre Operation DBmail Digg Digital Certification Discussion Group Django DNS Docker Domain Duit Online Economy Elastic Stack Elasticsearch ELK email email server English Evangelist Events Family Tree Fedora File System Firefox Foss FOSS.my FreeBSD FTX Gesaan Gluster Gmail Godaddy.com Google Google App GTUG Hacking Hadoop hafnie Harisfazillah Jamel horde HP-UX hwclock IBM ICT Service Delivery and Operation Indonesia Internet Internet Tools Itanium Jabatan IT Negara Jaring Java Javascript Jepun Jiwang Joke Joomla K3S K3Sup Kernel Kesihatan Kibana KOSTEM Kubernetes ldap Linux Linux Counter linuxmalaysia Logstash Love Mailman MailScanner Mailwatch Malay Malaysia MAMPU MDeC meetup Melaka Melayu Merdeka Microsoft Migration mirror sites Money Online Monitor MOSC 2010 MOSC2010 mosc2011 MOSC2013 MOSCMY MOSCMY2014 MOSCMY2015 Mozilla MPI MSC Malaysia MSC Malaysia OSCONF MSCOSCONF My Love MyGOSSCON MyMeeting Mypenguin99 mysql Nagios NagiosQL Negaraku Nginx nss_ldap ntp OBW2014 Open Office Open Source openldap Openoffice.org OpenSSH OpenStack Opera OS2 OS400 OSCC OSCC MAMPU osdc.my OSS OSS Policy OWASP Parallel Computing People Power Personal Petition PGP PHP Pligg Podman Politik Postfix Postgresql Programming Proxmox Python q1moscmy2015 Questionnaires Research Research tools RPM SASSIAN Sassian 85-89 Sassians 85-89 SCO Security Sekolah Sekolah Alam Shah Shell script Software License Solaris SongketMail SongketMailFilter sourceforge spam spamassassin Spoof SSH Survey SVR4 System Tools Technorati Terjemahan Terminal TMnet Tor Training translation Treasury Malaysia Trend Micro Twitter Ubuntu Unix Virtualization VMS VOIP Wang Web Server Windows Zimbra
 

LinuxMalaysia Mastodon