Re: PHP - Oracle 7.3.4 - ORA-12154

From: Date: Fri, 07 Feb 2003 16:14:09 +0000
Subject: Re: PHP - Oracle 7.3.4 - ORA-12154
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-25507@lists.php.net to get a copy of this message
> I set up PHP on a Sun Solaris box a week ago (see phpinfo output below). > It has oracle 7.3.4 and php 4.0.4pl1 so I'm using the --with-oracle > configure option. Due to a special module we're using we're stuck with > using that php version (4.0.4pl1). Couldn't you use --with-oci, even with that php version ? it's the newer and better module for oracle (both oracle 7 and 8). Look at ocilogon() function and friends. > At first I was getting the ORA-12154 TNS:could not resolve service name > error almost every time. I then followed the instructions to set the > ORACLE_HOME and TNS_ADMIN environment variables in apaches http.conf. > I've also tried using the putenv function to set the variables. I had also trouble with ora12154. I use now a workaround : when I use : $connection = OCILogon($user, $pass, $tns) or die("No Connection"); for the third parameter ($tns), I don't use the name found in tnsnames.ora, but directly the entire syntax something like : (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (COMMUNITY = tcp.world) (PROTOCOL = TCP) (Host = <ip address>) (Port = 1521) ) (ADDRESS = (COMMUNITY = tcp.world) (PROTOCOL = TCP) (Host = <ip address>) (Port = 1526) ) ) (CONNECT_DATA = (SID = ORCL) ) ) Regards, Philippe

« previous php.db (#25507) next »