Ocilogon () function. ocilogonocienvnlscreate () failed

Source: Internet
Author: User
Ocilogon () function. ocilogonocienvnlscreate () failed a windows Server (where the PHP program is also located), "remotely connect" to oracle but report this error. do you say it is ORACLE_HOME online, you have also set ORACLE_HOMT ocilogon () function in the local environment variable. ocilogon ocienvnlscreate () failed
On a windows Server (where the PHP program is located), this error is reported when oracle is remotely connected. according to the Internet, does it mean ORACLE_HOME? ORACLE_HOMT is also added to the environment variables set on the local machine, it cannot be solved...

------ Solution --------------------


I have never used anything as high-end as oracle. this is Xu's Changxiang. I will help you later.
------ Solution --------------------
Paste your connection code

It seems that the environment variable needs to be configured to remotely connect to oracle8, but it is not necessarily!
You only need to provide the address, port, and listener name of the remote database.

I am not familiar with oracle. I only explored oracle when I needed to read data from oracle10 last year.
I feel that using pdo_oci to connect to oracle is very simple.

------ Solution --------------------
Ocilogon -- oci_connect () alias

Oci_connect () returns a connection identifier required for most OCI calls. The third optional parameter can contain the name of the local Oracle instance to be connected or the entry in tnsnames. ora. If no optional third parameter is specified, PHP uses the environment variable ORACLE_SID (Oracle instance) or TWO_TASK (tnsnames. ora) to determine which database to connect.

Note: If PHP uses the Oracle Instant Client, you can use an easy-to-name connection method. for details, refer to the following section: examples. Basically, this means you can specify "// db_host [: port]/database_name" as the database name. However, if you want to use the old naming method, you must set either ORACLE_HOME or TNS_ADMIN.


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.