From: jnavratil at houston dot rr dot com
Operating system: Fedora Core 4.2
PHP version: 6CVS-2006-02-10 (snap)
PHP Bug Type: OCI8 related
Bug description: OCIEnvNlsCreate() failed.
Description:
------------
OCIEnvNlsCreate() failed. Message asks to check that ORACLE_HOME is set
correctly. I've downloaded the latest snapshot ('php5.1-200602101330')
and patched oci8.c to report getenv("ORACLE_HOME") into the error_log and
verified that it is correct. CLI version will properly connect,
php5_module through Apache will not.
Configuration script to build php is:
./configure \
--cache-file=../config.cache \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d \
--disable-debug \
--disable-rpath \
--with-bz2 \
--with-curl \
--with-gd --with-freetype-dir=/usr --with-png-dir=/usr
--with-jpeg-dir=/usr --enable-gd-native-ttf \
--with-gettext \
--with-gmp \
--with-iconv \
--with-openssl --with-kerberos \
--with-pspell=/usr \
--with-pcre-regex=/usr \
--with-zlib \
--with-layout=GNU \
--enable-exif \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-sysvmsg \
--enable-shmop \
--enable-wddx \
--with-pear=/usr/share/pear \
--enable-ucd-snmp-hack \
--enable-memory-limit \
--enable-calendar \
--with-mime-magic=/etc/httpd/conf/magic \
--without-sqlite \
--with-libxml-dir=/usr \
--with-xml \
--with-apxs2=/usr/sbin/apxs \
--without-mysql \
--without-odbc \
--disable-dba \
--with-oci8=/opt/app/oracle/product/10.2.0/db_1
Reproduce code:
---------------
$dbh = OCILogon('my-user', 'my-pwd', 'my-db');
Expected result:
----------------
I expect a valid database resource
Actual result:
--------------
$dbh is boolean false. Error_log contains:
[Fri Feb 10 08:58:58 2006] [error] [client 127.0.0.1] PHP Warning:
ocilogon() [<a href='function.ocilogon'>function.ocilogon</a>]:
OCIEnvNlsCreate() failed. There is something wrong with your system -
please check that ORACLE_HOME is set and points to the right directory in
/opt/www/html/listViews.php on line 3
[Fri Feb 10 08:58:58 2006] [error] [client 127.0.0.1] PHP Warning:
ocilogon() [<a href='function.ocilogon'>function.ocilogon</a>]:
/opt/app/oracle/product/10.2.0/db_1 in /opt/www/html/listViews.php on line
3
Note: '/opt/app/oracle/product/10.2.0/db_1' is my correct ORACLE_HOME and
is reported using getenv("ORACLE_HOME").
--
Edit bug report at http://bugs.php.net/?id=36355&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=36355&r=trysnapshot44
Try a CVS snapshot (PHP 5.1):
http://bugs.php.net/fix.php?id=36355&r=trysnapshot51
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=36355&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36355&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=36355&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36355&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36355&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36355&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36355&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36355&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=36355&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=36355&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36355&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36355&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36355&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36355&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36355&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36355&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36355&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36355&r=mysqlcfg