php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37147 connecting with OCI8 on Oracle 10g database
Submitted: 2006-04-20 12:20 UTC Modified: 2006-04-20 12:40 UTC
From: jerome dot kaluza at skynet dot be Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 5.1.2 OS: LINUX
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jerome dot kaluza at skynet dot be
New email:
PHP Version: OS:

 

 [2006-04-20 12:20 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-20 12:26 UTC] 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:40 UTC] jerome dot kaluza at skynet dot be
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
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 18:01:32 2024 UTC