note 11528 deleted from function.ocilogon by tony2001
| From: | tony2001@php.net | Date: | Mon, 01 Aug 2005 22:05:50 +0000 |
| Subject: | note 11528 deleted from function.ocilogon by tony2001 | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-92913@lists.php.net to get a copy of this message | ||
Note Submitter: tabish_mohd at yahoo dot com,sdodhiya at yahoo dot com
----
After long research we done it:
the error is:
Warning: _oci_open_server: ORA-12154: TNS:could not resolve service name.
OR
Warning: _oci_open_server: ORA-12154: TNS:could not resolve service name
By setting the envornment variable doesn't work.(putenv(ORACLE_SID=TNSNAME");
now the solution is:
put the tnsname.ora contents into the variable as,
$db="(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = RemoteServerIP)(PORT = 1521))
(CONNECT_DATA = (SID = ORCL))
)";
OCILogon("scott","tiger",$db);
now it will work.