Re: Connecting to Oracle

From: Date: Tue, 13 Mar 2001 18:23:15 +0000
Subject: Re: Connecting to Oracle
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-7416@lists.php.net to get a copy of this message
I'm not looking forward to this... Due to circumstances beyond my control, I will be forced into a similar configuration soon. Try putenv("ORACLE_SID=WKDS.world"); If your sqlnet.ora does does not specify .world as the default domain, then that may be the problem. Was your TNSNAMES.ORA file ftp'd from somewhere to where it is now? If so, did you use the ascii or text mode option? HTH "Herbert Groot Jebbink" <herbert@groot.jebbink.nl> wrote in message news:01Mar13.154439cet.115212@gomera.rnw.nl... > Hello, > > I have problems connecting with PHP to Oracle. > > - Operating system is Windows 95 > - Apache version is 1.3.14 > - The PHP version is 4.04pl1 (NuSphere 1.13.6) > - The line "extension=php_oracle.dll" is active in php.ini > - De Oracle Database version is 7.3.4.0.0 > - De SQL*NET client version is 2.3.4.0.0 > - Using the SQL PLUS 3.3.4.0.0 client on this machine works fine: > - The ociw32.dll file is in the path of the webserver > > The test program is: > > <?php > putenv('ORACLE_HOME=c:\orawin95'); > putenv("ORACLE_SID=WKDS"); > $conn = ora_logon("hgj@wkds", "hgj"); > ?> > > The result is: > > Warning: Unable to connect to ORACLE (ORA-12154: TNS:could not resolve > service name) in /www/data/ontwikkel/test/php/test3.php on line 4 > > I have lookup the ORA-12154 error and it talks about the tnsnames.ora > file, this file is located in c:\orawin95\network\admin\ and I have set > ORACLE_HOME to c:\orawin95, so it must find that file, the part > of the database in tnsnames.ora is below. > > wkds.world = > (DESCRIPTION = > (ADDRESS_LIST = > (ADDRESS = > (COMMUNITY = tcp.world) > (PROTOCOL = TCP) > (Host = rnwux1) > (Port = 1521) > ) > (ADDRESS = > (COMMUNITY = tcp.world) > (PROTOCOL = TCP) > (Host = rnwux1) > (Port = 1526) > ) > ) > (CONNECT_DATA = (SID = WKDS) > ) > ) > > > Greetings, Herbert > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#7416) next »