Does the Oracle client need to be installed when php accesses a remote Oracle server? How can this problem be solved?

Source: Internet
Author: User
Does the Oracle client need to be installed when php accesses a remote Oracle server? When php accesses a remote Oracle database server, does the php server need to install the Oracle client? ------ Solution ------------------ the server on which your php resides is installed with a client. For example, in linux, it must be compiled with the client software. For example, in win32, in addition to installing the client, some simple configuration is required. --- Does php need to install the Oracle client to access a remote Oracle server?
When php accesses a remote Oracle database server, does the php server need to install the Oracle client?

------ Solution --------------------
You need to install a client on the server where your php is located. For example, in linux, it must be compiled with the client software. For example, in win32, in addition to installing the client, some simple configuration is required.
------ Solution --------------------
Oracle client is required.
------ Solution --------------------
Yes, or how do you install Oracle extensions?
------ Solution --------------------
The manual is clearly written.

Http://cn.php.net/manual/zh/ref.oci8.php

Requirement
The Oracle client library is required to use this extension. For Windows users, php_oci8.dll can be used only in libraries with a minimum version of 10.

The most convenient way to install all required files is to use the Oracle Instant Client. you can get it from: http://www.oracle.com/policy/tech/oci/instantclient/instantclient.html. To enable the OCI8 module to work, the "basic" version of Oracle Instant Client is sufficient. The Instant Client does not require ORACLE_SID or ORACLE_HOME environment variables to be set. However, you may still need to set LD_LIBRARY_PATH and NLS_LANG.

Before using this extension, make sure that the Oracle environment variables have been correctly set for Oracle users and web daemon users. These variables should be set before starting the web server. The environment variables to be set are listed below:


ORACLE_HOME

ORACLE_SID

LD_PRELOAD

LD_LIBRARY_PATH

NLS_LANG

For less-used Oracle environment variables such as TNS_ADMIN, TWO_TASK, ORA_TZFILE, and various Oracle global settings such as ORA_NLS33, ORA_NLS10, and NLS _ *, see Oracle stability.

After setting environment variables for web server users, you also need to add the web server user (nobody, www) to the oracle Group.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.