#37147 [Bgs]: connecting with OCI8 on Oracle 10g database
| From: | jerome dot kaluza at skynet dot be | Date: | Thu, 20 Apr 2006 12:40:49 +0000 |
| Subject: | #37147 [Bgs]: connecting with OCI8 on Oracle 10g database | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-96040@lists.php.net to get a copy of this message | ||
ID: 37147
User updated by: jerome dot kaluza at skynet dot be
Reported By: jerome dot kaluza at skynet dot be
Status: Bogus
Bug Type: OCI8 related
Operating System: LINUX
PHP Version: 5.1.2
New Comment:
i've exported ORACLE_HOME, restarted apache, and allow read access to
the ORACLE_HOME dir and all subdir but it's still the same, but i'll
continue to dig in the way you indicated tony, thx
Previous Comments:
------------------------------------------------------------------------
[2006-04-20 12:26:25] tony2001@php.net
Either Apache doesn't see the environment variables you set or Apache
doesn' have enough permissions to read required files in ORACLE_HOME
dir.
Not PHP problem.
------------------------------------------------------------------------
[2006-04-20 12:20:05] jerome dot kaluza at skynet dot be
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 this bug report at http://bugs.php.net/?id=37147&edit=1