php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13526 ORA-01005, ORA-12154 , ORA-12505
Submitted: 2001-10-03 05:53 UTC Modified: 2001-10-03 05:57 UTC
From: i990712 at dei dot isep dot ipp dot pt Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 4.0.6 OS: Linux( Suse 7 )
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: i990712 at dei dot isep dot ipp dot pt
New email:
PHP Version: OS:

 

 [2001-10-03 05:53 UTC] i990712 at dei dot isep dot ipp dot pt
The folowing precedures have been tested when connecting to a HP UX with Oracle 7.x using of couse the OCI8 as the client interface.

Add those lines to the web server config files or set and export those ones before the web server starts.

SetEnv ORACLE_HOME /usr/local/oracle
SetEnv ORACLE_SID <sid>
SetEnv LD_LIBRARY_PATH /usr/local/oracle/lib
SetEnv TNS_ADMIN /usr/local/oracle/tnsnames.ora
SetEnv TWO_TASK /usr/local/oracle/tnsnames.ora
SetEnv NLS_LANG  English_America.WE8ISO8859P1
SetEnv ORACLE_BASE /usr/local

When calling the OCILogon do this:

$db = "  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST =server_ip_or_dns_name)(PORT = 1521))
    (CONNECT_DATA= (SID = _sid_))
    )";

The previous definition is a copy of the service definition that is stored in the tnsnames.ora file.

Next, call the OCILogon function using the folowing format:

OCILogon("user/password","password", $db);

To avoid ORA-01005 error, set the NLS_LANG environment variable to English_America.WE8ISO8859P1 ( some other values may work...but we have found that this one works for us ).

To avoid ORA-12154 and ORA-12505, use the service definition as the OCILogin third parameter.

It seams that there are errors in the OCILogin function in the manual...please correct them.

I hope these lines can help.

Regards
Miguel Carvalho

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-03 05:55 UTC] zak@php.net
Duplicate of bug #13526

 [2001-10-03 05:57 UTC] derick@php.net
Bogus (submitted twice per accident)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 15:01:28 2024 UTC