Bug #10206 Updated: PHP in CGI mode fails to perform OCILogon

From: Date: Mon, 18 Feb 2002 05:00:01 +0000
Subject: Bug #10206 Updated: PHP in CGI mode fails to perform OCILogon
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-483@lists.php.net to get a copy of this message
ID: 10206 Updated by: php-bugs@lists.php.net Reported By: nick@tf.kharkov.net -Status: Feedback +Status: No Feedback Bug Type: OCI8 related Operating System: IIS 4.0, NT Server 4.0 SP6 PHP Version: 4.0.4pl1 New Comment: No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". Previous Comments: ------------------------------------------------------------------------ [2002-01-13 07:12:03] lobbin@php.net Sounds like an user error, did you get this right? Ff not, please try with latest release 4.1.1. ------------------------------------------------------------------------ [2001-04-11 02:21:19] nick@tf.kharkov.net 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 ------------------------------------------------------------------------ [2001-04-06 11:14:10] sniper@php.net 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] nick@tf.kharkov.net 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:\InetPub\wwwroot\test.php4 on line 5 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=10206&edit=1

« previous php.bugs (#483) next »