?
Solved

PHP oracle

Posted on 2001-09-02
6
Medium Priority
?
378 Views
Last Modified: 2012-06-21
Hi
I am using PHP and Oracle 8i on win2000Server I set up oracle fine. Everything is running in SQLplus and even in the coldfusion using the ODBC connection. But when I use the oci8.dll and oracle.dll and odbc function it gives me error like


Warning: Oracle: Connection Failed: ORA-12638: Credential retrieval failed in c:\inetpub\wwwroot\php\oracle.php on line 3

I had already set the env variables ORACLE_HOME< ORECLE_SID etc.

Please Help me

harry
0
Comment
Question by:harwantgrewal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 1

Expert Comment

by:kimcheng
ID: 6449728
maybe you should try  oci function in php instead of ODBC.
0
 
LVL 5

Author Comment

by:harwantgrewal
ID: 6451144
But when I use the oci8.dll and oracle.dll and
odbc function it gives me error like


I think this line indicates that I use both of the functions.

Harry
0
 
LVL 1

Expert Comment

by:kimcheng
ID: 6451878
odbc and oci8 are different sets of functions.
anyway, can you post your code for connect oracle then?
0
WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

 
LVL 5

Author Comment

by:harwantgrewal
ID: 6453970
<?php
$db="harry.deepblue";
$user="system";
$pass="manager";
OCIlogon($user,$pass,$db);

?>


Harry
0
 
LVL 1

Accepted Solution

by:
kimcheng earned 300 total points
ID: 6455211
you didn't setup the oracle variable correctly. so php doesn't know about the default oracle db name. also, er.... wrong grammar. try the code list below

<?php
PutEnv("ORACLE_SID=harry.deepblue");
$user="system";
$pass="manager";

$connection = Ora_Logon ($user, $pass);
if (!$connection){
  echo Ora_ErrorCode($connection).": ".Ora_Error($connection)."<BR>";
  exit;
}  

?>
0
 
LVL 5

Author Comment

by:harwantgrewal
ID: 6517602
Got myself anyway thanks !

Harry
0

Featured Post

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This article discusses how to create an extensible mechanism for linked drop downs.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question