note 10980 rejected from function.ocilogon by didou
| From: | didou@php.net | Date: | Tue, 12 Aug 2003 08:37:49 +0000 |
| Subject: | note 10980 rejected from function.ocilogon by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-53970@lists.php.net to get a copy of this message | ||
Note Submitter: mpeter@extreme.hu
----
Apache 1.3.12/php4.04pl1/ORACLE8/Windows NT
I'am trying to connect to the database server, but it always send the message below:
_oci_open_server: ORA-12154: TNS:could not resolve service name in D:\ProgramFiles\Apache
Group\Apache\htdocs/index.php on line 15
I have read all the messages on this topic, but I still can't solve the problem and I'am
getting mad about this.
The environment:
The Apache is running on my local computer, but the Oracle is running on an other machine.
httpd.conf:
SETENV ORACLE_HOME "D:\ORANT"
SETENV ORACLE_SID "DBCDH.WORLD"
I have tried the TNS_ADMIN setting, but it didn't work.
tnsnames.ora:
DBCDH.WORLD =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = SRV_CDH)
(PORT = 1521))
(CONNECT_DATA = (SID = CDH1))
)
part of php source:
$connection = OCILogon ("cdh1test","cdh", "DBCDH.WORLD");
if ($connection == false){
echo OCIError($connection)."<BR>";
exit;
}
What could be the problem? The user cdh1test exists, and I can connect to the Oracle from Delphi,
but not PHP.
The tnsnames.ora is in the D:\ORANT\NET80\ADMIN directory.
Thanks in advance,
Peter