ocilogon() function.ocilogon ocienvnlscreate() failed
A windows server (the PHP program is also here), “remote connection” to Oracle, but this error is reported. According to the Internet, it is an ORACLE_HOME problem, and it has also been set on this machine. Adding ORACLE_HOMT to the environment variable cannot solve the problem…
——Solution————– ——
I have never used something as high-end as Oracle. This is Lao Xu’s specialty. Wait for Lao Xu to help you take a look.
——Solution——————–
Post Show your connection code
It seems that remote connection to oracle8 requires configuring environment variables, but not necessarily!
Just give the address, port, and listening name of the remote database.
I am not familiar with Oracle. I only became familiar with it when I needed to read data from Oracle10 last year. After some exploration
I feel that using pdo_oci to connect to oracle is extremely simple.
——Solution——————–
ocilogon — Alias for oci_connect()
oci_connect() returns a connection identifier required by most OCI calls. The optional third parameter can contain the name of the local Oracle instance or entry in tnsnames.ora to which you want to connect. If the optional third parameter is not specified, PHP uses the environment variable ORACLE_SID (Oracle instance) or TWO_TASK (tnsnames.ora) to determine which database to connect to.
Note: If you are using Oracle Instant Client for PHP, you can use the easy named connection method. See instructions here: http://download-west.oracle.com/docs/cd/B12037_01/network .101/b10775/naming.htm#i498306. Basically this means that you can specify “//db_host[:port]/database_name” as the database name. But if you want to use the old method of naming, you must set one of ORACLE_HOME or TNS_ADMIN.