php7 does not have oci8 and needs to be installed and configured. The method for installing oci8 extension in php7 is: 1. Download and install "oracle-instantclient19.5-basic-19.5.0.0.0-1.x86_64.rpm"; 2 , add environment variables; 3. Search for oci8 directly on the PHP official website; 4. Install oci8 through the "pecl install oci8" command.
The operating environment of this tutorial: centos7 system, PHP7 version, Dell G3 computer.
php7 does not have php oci8?
Requires installation and configuration.
php7 Install extension-oci8 Steps and methods:
1. Basic environment
Environment: centos7 PHP 7.2.24
2 . oracle client
2.1 Official address
https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html
uses the latest version - Version 19.5.0.0.0, both must be installed, the devel version is SDK
oracle-instantclient19.5-basic-19.5.0.0.0-1.x86_64.rpm oracle-instantclient19.5-devel-19.5.0.0.0-1.x86_64.rpm
2.2 Installation
rpm -ivh oracle-instantclient19.5-basic-19.5.0.0.0-1.x86_64.rpm rpm -ivh oracle-instantclient19.5-devel-19.5.0.0.0-1.x86_64.rpm
After the installation is completed, the default path is –/usr/lib/oracle/19.5/client64. I have not added environment variables. If necessary, add them according to your own configuration.
vim /etc/profile source /etc/profile
3. oci8 extension
The installation of online articles is quite confusing. Go to the PHP official website and directly search for oci8 and the results will appear;
3.1 Installation
The first method I took was pecl install oci8; the installation process will always show Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you 're compiling with Oracle Instant Client [autodetect]: Just enter the client path address according to the official instructions: instantclient,/usr/lib/oracle/19.5/client64/lib
3.2 Check
After the installation is completed, use –php -m to check whether the installation is successful. Enter the directory –/usr/lib64/php/modules and check whether –oci8.so exists;
Restart If it fails later, you can add extension-extension=oci8.so in the /etc/php.ini file.
3.3 Restart php-fpm
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of Does php7 not have php oci8?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment
