Re: ORACLE
| From: | Philippe Saladin | Date: | Mon, 06 Aug 2001 06:37:30 +0000 |
| Subject: | Re: ORACLE | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-8673@lists.php.net to get a copy of this message | ||
I also had trouble with ORA 12154, but using OCILogon. I resolved it by
using not the name of the server, but the definition of its localization
(what you find in the TNSNAMES.ORA file). Something like :
$oracletns = "(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = tcp.world)
(PROTOCOL = TCP)
(Host = 21.1.1.145)
(Port = 1521)
)
(ADDRESS =
(COMMUNITY = tcp.world)
(PROTOCOL = TCP)
(Host = 21.1.1.145)
(Port = 1526)
)
)
(CONNECT_DATA = (SID = ORCL)
)
)";
$Conn=OCILogon($oracleusername, $oraclepassword,$oracletns);
Hope it will help you,
Best Regards,
Philippe
"C.Chassagneux" <nexen@the-phoenix.org> a écrit dans le message news:
20010803123006.6835.qmail@pb1.pair.com...
> I have a simple script in php :
>
> putenv("ORACLE_HOME=D:\\ORANT");
> putenv("TNS_ADMIN=D:\\ORANT\\NETWORK\\ADMIN");
> putenv("ORACLE_SID=xxxxxxxxx");
>
> echo "Oracle : ". getenv("ORACLE_HOME")." \n";
> echo "TNS_ADMIN : ". getenv("TNS_ADMIN")." \n";
> echo "ORACLE_SID : ". getenv("ORACLE_SID")." \n";
>
> $connect_oracle = ora_logon("xxxxx@xxxxxxx" ,
> "xxxxxxxxx" );
>
> But then i do :
> e:\> php testoracle.php
> the prog reply : ORA-12154 : TNS name not resolved
>
> with apache server, I don't have this problem.
> Can u help me ?
> PHP4.0.6 - Win NT4W SP5
>
>
>
>
>
>
>