From: david at boe dot es
Operating system: Linux
PHP version: 4.3.2
PHP Bug Type: OCI8 related
Bug description: php not passing env vars to oci8 libs as an apache module
Description:
------------
For some strange reason, php is not correctly passing the info on some key
oracle env vars (TNS_ADMIN) to the oci8 lib.
getenv() is able to catch the value, but ocilogon not.
The cli version works ok (with standard ENV vars)
Reproduce code:
---------------
I have in my httpd.conf:
setenv ORACLE_HOME /var/oracle/product/8.1.7
setenv TNS_ADMIN /var/oracle/product/8.1.7/network/admin
Script 1:
<?
$tns=getenv('TNS_ADMIN');
echo "$tns<p>";
$conn = ocilogon('publicac',cdnp1m,'wdb2');
?>
returns:
/var/oracle/product/8.1.7/network/admin
Warning: ocilogon(): _oci_open_server: Error while trying to retrieve text
for error ORA-12154 in /web/webboe/kk.php on line 4
Script 2:
<?
putenv("TNS_ADMIN=/var/oracle/product/8.1.7/network/admin");
$tns=getenv('TNS_ADMIN');
echo "$tns<p>";
$conn = ocilogon('publicac',cdnp1m,'wdb2');
?>
returns:
/var/oracle/product/8.1.7/network/admin
and connects OK to the oracle database.
--
Edit bug report at http://bugs.php.net/?id=25178&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25178&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25178&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25178&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25178&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25178&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25178&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25178&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25178&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25178&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25178&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25178&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25178&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25178&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25178&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25178&r=gnused