Home >Backend Development >PHP Problem >How to connect php7 to oracle

How to connect php7 to oracle

尚
Original
2019-10-31 17:36:493725browse

How to connect php7 to oracle

1. Open the PHP extension, php_pdo_oci.dll, php_oci8_12c.dll, and php_oci8.dll.

Then check phpinfo

How to connect php7 to oracle

Copy the path marked on the picture.

Open CMD and execute: mkdir c:\php-sdk\oracle\x64\instantclient_12_1\sdk to create the directory.

2. Unzip the prepared Instant Client, and then copy all the files in the root directory to the sdk directory created above. (Important)

How to connect php7 to oracle

3. Create environment variable

Path, add C:\php-sdk\oracle\x64\instantclient_12_1\sdk

ORACLE_HOME = C:\php-sdk\oracle\x64\instantclient_12_1\sdk

TNS_ADMIN = C:\php-sdk\oracle\x64\instantclient_12_1\sdk

4. Copy File:

1> Copy the files in the C:\php-sdk\oracle\x64\instantclient_12_1\sdk directory to Apache's bin directory

2> Similarly, copy the above files, Copy to the root directory of PHP.

Just restart the Apache service.

connect:

How to connect php7 to oracle

The above is the detailed content of How to connect php7 to oracle. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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