Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How linux php installs pdo-oci extensions

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article focuses on "how to install pdo-oci extensions in linux php". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how linux php installs pdo-oci extensions".

Linux php install pdo-oci extension method: 1, install Oracle client; 2, enter the php source installation package, execute make;3, add a "extension=pdo_oci.so" in the php.ini configuration.

This article operating environment: linux5.9.8 system, php version 7.1.25, DELL G3 computer

How does linux php install the pdo-oci extension?

Install php extensions pdo_oci and oci8 under linux:

It took me more than half a day to install the extension. I hereby record the installation process. I hope this tutorial can help you and avoid detours in the installation process.

Related environments already exist on the CentOS server: apache2, php7

Need to install: 1.oracle client, 2.oci8 extension, 3.pdo_oci extension

Install the Oracle client

The Oracle client can be downloaded from the oracle official website (https://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html)

Select the above two installation packages, download them to / usr/local/src, and extract them:

Unzip instantclient-basic-linux.x64-11.2.0.4.0.zip unzip instantclient-sdk-linux.x64-11.2.0.4.0.zip

Then enter the unzipped directory: cd instantclient_11_2/ connects the following three files

Ln-s libnnz11.so libnnz.soln-s libclntsh.so.11.1 libclntsh.soln-s libocci.so.11.1 libocci.so

Then move the extracted directory to the / usr/local/lib directory and rename it to 'instantclient' mv. / instantclient_11_2 / usr/local/lib/instantclient

Second, install the oci8 extension

Enter the source code installation package of php: cd / usr/local/src/php-7.1.25/ext/oci8/

Execute / usr/local/php/bin/phpize

Then execute:. / configure-- with-php-config=/usr/local/php/bin/php-config-- with-oci8=shared,instantclient,/usr/local/lib/instantclient

Then execute make

Finally, make install

Entering cd / usr/local/php/lib/php/extensions/no-debug-zts-20160303/ to check the file with oci8.so indicates that the installation is successful.

The next step is to add an extension=oci8.so sentence to the php.ini configuration

Install the pdo_oci extension

Enter the source code installation package of php: cd / usr/local/src/php-7.1.25/ext/pdo_oci

Execute / usr/local/php/bin/phpize

Then execute:. / configure-- with-php-config=/usr/local/php/bin/php-config-- with-pdo-oci=instantclient,/usr/local/lib/instantclient

Then execute make

Finally, make install

Entering cd / usr/local/php/lib/php/extensions/no-debug-zts-20160303/ to check the file with pdo_oci.so indicates that the installation is successful.

The next step is to add an extension=pdo_oci.so sentence to the php.ini configuration

Check phpinfo. If you have oci8 and pdo_oci, you can add it successfully.

At this point, I believe you have a deeper understanding of "how linux php installs pdo-oci extensions". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report