Re: AW: AW: [PHP] Access to oracle db

From: Date: Tue, 10 Jul 2001 16:17:12 +0000
Subject: Re: AW: AW: [PHP] Access to oracle db
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-57184@lists.php.net to get a copy of this message
Hi, I use Oracle client 8.1.x. I've folloved your suggestion but PHP interpreter returned the same error. It's as PHP interpreter doesn't find tnsnames.ora (if I rename tnsnames.ora to xxxxtnsnames.ora doesn't change, error is always the same). sqlplus executed with parameter sr_tst/sr_tst@ORATEST is correctly executed, it's a mistery. I don't know how I can do. Thanks Giuliano Sebastian Stadtlich wrote: > which oracle version do you use? > if it is 8.x then you should use the OCI-Functions > not ora > if it is not 8.X then i can't help. > ( and you should upgrade :-] ) > the tnsnames.ora looks ok > try > ocilogon("sr_tst" , "sr_tst","ORATEST"); > > sebastian > > > -----Ursprungliche Nachricht----- > > Von: giupar@sirmione.sodalia.it [mailto:giupar@sirmione.sodalia.it]Im > > Auftrag von Parisi Giuliano > > Gesendet: Dienstag, 10. Juli 2001 17:49 > > An: Sebastian Stadtlich > > Cc: 'Php-General (E-Mail) > > Betreff: Re: AW: [PHP] Access to oracle db > > > > > > HI, > > I use this PHP call to open an Oracle db connection: > > > > ora_logon("sr_tst@ORATEST" , "sr_tst") > > > > where user=password=sr_tst and service name is ORATEST . > > > > My tnsnames.ora contains: > > > > ORATEST = > > (DESCRIPTION = > > (ADDRESS = > > (PROTOCOL = TCP) > > (Host = offida) > > (Port = 1525) > > ) > > (CONNECT_DATA = > > (SID = ORATEST) > > ) > > ) > > > > Thanks > > > > Giuliano > > > > Sebastian Stadtlich wrote: > > > > > hi > > > > > > did you specify the third 'optional' parameter? > > > OCILogon (string username, string password [, string db]) > > > > > > db should be your tnsname > > > on windows i could not make it without that parameter. > > > it should be set as enviroment variable ORACLE_SID, > > > but that did not work for me on win( it does on linux ) > > > despite that no further configuration was needed by me > > after installing > > > the > > > oracle client > > > > > > sebastian > > > > > > > -----Ursprungliche Nachricht----- > > > > Von: giupar@sirmione.sodalia.it > [mailto:giupar@sirmione.sodalia.it]Im > > > Auftrag von Parisi Giuliano > > > Gesendet: Dienstag, 10. Juli 2001 17:10 > > > An: php-general@lists.php.net > > > Betreff: [PHP] Access to oracle db > > > > > > > > > Hi, > > > I've installed Apache server and PHP interpreter on Microsoft > Windows > > > platform. I'm trying to access to Oracle db without results (I've > > > installed Oracle client and configured tnsnames.ora file). PHP > > > interpreter return following error: > > > > > > Oracle: Connection Failed: ORA-12154: TNS:could not resolve > > > service name > > > in ... > > > > > > I think that Oracle client used by PHP doesn't find tnsnames.ora > file > > > (I've tryied to move tnsnames.ora file from installation folder to > > > another folder and error message doesn't change). > > > sqlplus utility, that used the same tnsnames.ora file, > > > correctly access > > > to oracle db without problem . > > > The question is: how can I configure PHP to enable access to oracle > db > > > via oracle client ? > > > Thanks in advantage for any suggestion. > > > Regards > > > > > > Giuliano > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-general-help@lists.php.net > > > To contact the list administrators, e-mail: > > > php-list-admin@lists.php.net > > >

« previous php.general (#57184) next »