#37147 [NEW]: connecting with OCI8 on Oracle 10g database
| From: | jerome dot kaluza at skynet dot be | Date: | Thu, 20 Apr 2006 12:20:05 +0000 |
| Subject: | #37147 [NEW]: connecting with OCI8 on Oracle 10g database | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-96038@lists.php.net to get a copy of this message | ||
From: jerome dot kaluza at skynet dot be
Operating system: LINUX
PHP version: 5.1.2
PHP Bug Type: OCI8 related
Bug description: connecting with OCI8 on Oracle 10g database
Description:
------------
I have a problem using OVI8 api with oracle 10g release 2
i am using open suse 10.0, apache 2.2, oracle 10g release 2 and PHP 5.1.2
ORACLE_HOME is defined as well as the SID,
the command line will work when i don't specify SID, if i specify a third
parameter to oci_connect, the operation will fail. (not TNS resolved)
i have configured PHP with this custom configure :
#!/bin/sh
export OPTIM=-02
./configure --prefix=/usr/local \
--with-apxs2=/usr/local/bin/apxs \
--with-inifile=/usr/local/etc/php.ini \
--with-xsl \
--enable-soap \
--with-gettext \
--with-oci8=/opt/oracle/product \
--enable-mbstring --with-mbstring=all \
--enable-memory-limit \
--disable-debug \
--with-libxml-dir=/usr/lib \
I hope this will be fixed soon as i saw while browsing that this problem
occured a certain number of times to several different php users
Reproduce code:
---------------
function connecter() {
try {
self::$connexion = ADONewConnection(self::BD);
if (!self::$connexion){
throw new ExceptionStock("Connexion impossible au serveur de base de
donnée Oracle!");
}
//self::$connexion->debug = true;
if
(!self::$connexion->PConnect(self::TNS,self::$login,self::$motDePasse)){
throw new ExceptionStock("Connexion impossible à la base ". "de donnée
".self::TNS."!");
}
self::executerRequete("ALTER SESSION SET
nls_numeric_characters='.,'");
}
catch (Exception $e){
die($e->getMessage());
}
}
Expected result:
----------------
the application should access database, verify the user exists in users
sql table and then redirect on the default user's page
Actual result:
--------------
Warning: ociplogon() [function.ociplogon]: OCIEnvNlsCreate() failed. There
is something wrong with your system - please check that ORACLE_HOME is set
and points to the right directory in
/srv/www/stock/lib/adodb/drivers/adodb-oci8.inc.php on line 212
--
Edit bug report at http://bugs.php.net/?id=37147&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37147&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=37147&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37147&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37147&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=37147&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37147&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37147&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37147&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37147&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37147&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=37147&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=37147&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37147&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37147&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37147&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37147&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37147&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37147&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37147&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37147&r=mysqlcfg