PHP 4.0 Bug #10206 Updated: PHP in CGI mode fails to perform OCILogon
| From: | nick at tf dot kharkov dot net | Date: | Wed, 11 Apr 2001 06:21:20 +0000 |
| Subject: | PHP 4.0 Bug #10206 Updated: PHP in CGI mode fails to perform OCILogon | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-51418@lists.php.net to get a copy of this message | ||
ID: 10206
User Update by: nick@tf.kharkov.net
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] 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:InetPubwwwroottest.php4 on line 5
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=10206