Home >Backend Development >PHP Problem >How to install oracle extension in php

How to install oracle extension in php

藏色散人
藏色散人Original
2021-09-01 10:26:312457browse

How to install oracle extension in php: 1. Check the local php version information; 2. Download the corresponding version of oracle instant client; 3. Download the oci expansion package; 4. Modify the PHP configuration file php.ini file; 5. Just check phpinfo.

How to install oracle extension in php

The operating environment of this article: Windows7 system, PHP5.6.28 version, Dell G3 computer

How to install oracle extension in php?

PHP Install oracle extension

Due to work needs, I need to use PHP oracle to write a project, so I have the following content:

I originally thought that php has a default oracle module, and just use the encapsulated functions, but later I found that it is not that simple. I won’t go into the whole process. It took a lot of effort and Baidu to find out the relevant ones. I have relatively little experience, so I decided to write it down.

The whole process is as follows:

  1. View local php version information (cmd: php -v or echo phpinfo())

How to install oracle extension in php

2. Download the corresponding version of oracle instant client

http://www.oracle.com/technetwork/ cn/database/features/instant-client/index-092699-zhs.html

X86 corresponds to the 32-bit version

How to install oracle extension in php

The key point is: you need to download these two compressed packages and install them under a unified path. Please be optimistic about the "basicLIte" and sqlplus versions. , and the version number is unified

For the specific installation process, please refer to: https://www.cnblogs.com/ivictor/p/3898702.html

3. Download the oci expansion package

http://pecl.php.net/package/oci8 Select as needed

How to install oracle extension in php

Note that the three boxes here correspond to the ones in the first step Three pieces of information

After downloading, unzip and copy the relevant .dll file to the php environment extension folder

xampp environment is: ../xampp/php/ext

4. After installation and verification, modify the PHP configuration file php.ini file and add extensions

extension=php_oci8.dll

extension=php_oci8_12c.dll (the specific extension version number matches the oci version installed in the third step)

5. All completed After that, you can repeat the first verification and find that there is an additional oci module in phpinfo. Otherwise, please double-check whether the first few steps are completely correct

How to install oracle extension in php

##Recommended: "

PHP Video Tutorial"


The above is the detailed content of How to install oracle extension in php. 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