ID: 10206
User Update by: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Open
Bug Type: OCI8 related
Description: PHP in CGI mode fails to perform OCILogon

Jani,
php manual suggests to set such enviroment variables:
ORACLE_HOME - seems to be path to a directory where an ORACLE product is. Am I right ?
I've tried to set it as 
SET ORACLE_HOME=C:\ORANT 
and then run php
C:\php4\php.exe c:\InetPub\wwwroot\test.php4
and I've got the same TNS-12154 error :-(
Could you possibly tell, what's is going wrong ?
P.S. I don't have any problems with php3 and Oracle on the same machine.
ORACLE_SID - seems to be SID identifier, TNSNAMES.ORA already has got SID defined for 
my TNS alias.
LD_PRELOAD - this variable seems to has meaning only for U*NIX systems
LD_LIBRARY_PATH - this variable seems to has meaning only for U*NIX systems
I can't guess what above two variables should contain on Win32 system. Could you 
possibly enlight me in this issue?
NLS_LANG,ORA_NLS33 - these variables seem to contain NLS settings, so windows registry 
has it


Previous Comments:
---------------------------------------------------------------------------

[2001-04-06 11:14:10] [EMAIL PROTECTED]
Just wondering if you have all the necessary environment
variables set? Check the manual page http://www.php.net/oci8

--Jani


---------------------------------------------------------------------------

[2001-04-06 08:47:51] [EMAIL PROTECTED]
When I use php in CGI mode any script can't connect to the Oracle DB throught the 
OCILogon call.
When I switch to the ISAPI mode these scripts work OK.
the sample script:
<?php
 $dbuser="scott";
 $dbpass="tiger";
 $dbhost="devnt01";
 if (! $dbconn=OCILogon($dbuser,$dbpass,$dbhost)) 
      print("Cannot connect to oracle db '$dbhost' as user '$dbuser'");
?>
oracle reports:
ORA-12154: TNS:could not resolve service name in C:InetPubwwwroottest.php4 on line 5


---------------------------------------------------------------------------


Full Bug description available at: http://bugs.php.net/?id=10206


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to