Okay, before I tear my hair out, I thought I'd submit this to the list.
We're running RC1 and Oracle 8 under Red Hat 6.1.
PHP is compiled static. It compiles clean with OCI. No problems there.
Apache version is 1.3.11. Compiles clean. No problems.
phpinfo(); shows appropriate OCI path info to ORACLE_HOME.
Apache environment variables are set appropriately for ORACLE_HOME and ORACLE_SID.
SQLPLUS from the command line works fine; the tnsnames.ora file is configured properly.
But, of course, PHP's OCI functions are not working at all. It insists that it cannot resolve the service name when I execute an ocilogon, and I'm assuming this means it is not finding tnsnames.ora. I have tried numerous forms of syntax in the ocilogon arguments; none work. I have tried referring to the short, and the fully qualified SID name; no luck there.
An interesting side note is that PHP refused to pick up ORACLE_HOME values until I hacked the defs .h file and manually set the PHP_ORACLE_ variables to appropriate values. I think something is broken in the configure program for this build, but that's a minor problem.
Anyway, we're running a tns listener trace, and nothing is being logged when we execute ocilogons from PHP; so there's definately no attempt being made by PHP to connect to the oracle listener.
Again, sqlplus works fine; tnsping works fine; the issue definately appears to be with the PHP build. I'm stumped at this point. Is there some undocumented magic or voodoo pertaining to the PHP oracle variables that I'm missing, here? For the record, I'm building against a complete oracle installation, both server and client.
Oracle is installed in /usr/local/o8/OraHome1, underneath which are the typical lib, network/admin, etc, etc, directories. This path is what we have ORACLE_HOME, PHP_ORACLE_HOME, and so forth, set to at compile-time with PHP and at boot-time with Apache.