Re: OCI8 broken in CGI, but works in ISAPI?

From: Date: Mon, 18 Sep 2000 07:17:51 +0000
Subject: Re: OCI8 broken in CGI, but works in ISAPI?
Groups: php.windows 
Request: Send a blank email to php-windows+get-2708@lists.php.net to get a copy of this message
Hi, >> I'm having this problem too: I can't get OCI8 connecting to a database with >> php.exe, while the ISAPI module can. I tried recompiling php myself linking >> again my own oci libraries, upgrading my oracle client to 8.1.5, but nothing >> works. >> Is it not strange that from the same compilation the CGI version behaves >> differently than the ISAPI module? >Koos, >1) Is your client 8.1.5 or 8.1.6? oci8 extension for php4 is compiled for 8.1.6 >Oracle client specifically. Try upgrading again to 8.1.6.... if you meant >8.1.6, then we'll work from there. My client is 8.1.5. But I compiled PHP myself and linked the oci modules against the library from this version. >2) How have you defined your Net8 service for this database... perhaps include a >bit from your tnsnames.ora and your php script that doesn't work in CGI. I tried it both on Win98 and NT4. The next configuration are from W98. TNSNAMES.ORA: # C:\ORAWIN95\NETWORK\ADMIN\TNSNAMES.ORA Configuration File:C:\orawin95\NETWORK\ADMIN\tnsnames.ora # Generated by Oracle Net8 Assistant MYSERVICE.INTERN = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = londen.intern)(PORT = 1521)) ) (CONNECT_DATA = (SID = orcl) ) ) The line that fails whith the TNS resolve error: $con = OCILogon("username", "password", "myservice"); >3) Try running the script OUTSIDE the web server, on a command line... go to the >directory of your oracle php script and type "c:\php\php.exe >myscriptname.php"... do you get the same error message? yes >It's not so strange that the ISAPI filter might work, and CGI not... I know that >with just a few configuration problems, I could get oci8 working under CGI, but >NOT under Apache module. Filters/modules and the CGI executable work in very >different ways. I still think it's strange. CGI version: php.exe, php4ts.dll, php_oci8.dll and DLL from oracle ISAPI module: php4isapi.dll, php4ts.dll, php_oci8.dll and DLL from oracle php.exe or php4isapi.dll should initialize php and pass the script to php4ts.dll. IMHO one of them (probably php.exe) is doing something wrong. PHP3's CGI version also have no problem so does SQLPLUS.EXE. Regards, Koos Vriezen

« previous php.windows (#2708) next »