• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 381
  • Last Modified:

PHP oracle

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
harwantgrewal
Asked:
harwantgrewal
  • 3
  • 3
1 Solution
 
kimchengCommented:
maybe you should try  oci function in php instead of ODBC.
0
 
harwantgrewalAuthor Commented:
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
 
kimchengCommented:
odbc and oci8 are different sets of functions.
anyway, can you post your code for connect oracle then?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
harwantgrewalAuthor Commented:
<?php
$db="harry.deepblue";
$user="system";
$pass="manager";
OCIlogon($user,$pass,$db);

?>


Harry
0
 
kimchengCommented:
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
 
harwantgrewalAuthor Commented:
Got myself anyway thanks !

Harry
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now