Does php7 not have php oci8?

藏色散人
Release: 2023-02-18 10:34:01
Original
1853 people have browsed it

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.

Does php7 not have php oci8?

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
Copy after login

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
Copy after login

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
Copy after login

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
Copy after login

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;

Does php7 not have php oci8?

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

Does php7 not have php oci8?

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!