Home » Developer & Programmer » Precompilers, OCI & OCCI » OCILogon failing at one of my sites.
OCILogon failing at one of my sites. [message #304496] Wed, 05 March 2008 07:17 Go to next message
stockton
Messages: 10
Registered: July 2005
Location: South Africa
Junior Member
I have a program that has worked for quite some time using the following code to connect to 10g. Now suddenly at one of my sites it is failing with ORA-24327 need explicit attach before authenticating a user. Please tell me where I have gone wrong.
<?php
function SGMDBConnect()
     {
     
// Connect to database...
     
global $SGMDBUsername, $SGMDBPassword, $SGMDBName, $conn;
  
    
$conn=OCILogon($SGMDBUsername, $SGMDBPassword, $SGMDBName);
     if ( !
$conn )
         {
         
$e = oci_error();  // For oci_connect errors pass no handle
         
echo htmlentities($e['message']);
         
trigger_error('Unable to OCILogon to database', E_USER_ERROR);
         die();
         }
     }
?>

[Updated on: Wed, 05 March 2008 07:17]

Report message to a moderator

Re: OCILogon failing at one of my sites. [message #304515 is a reply to message #304496] Wed, 05 March 2008 08:07 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Nice colors. Wink

Regards
Michel
Re: OCILogon failing at one of my sites. [message #304635 is a reply to message #304515] Wed, 05 March 2008 23:24 Go to previous messageGo to next message
stockton
Messages: 10
Registered: July 2005
Location: South Africa
Junior Member
I do not understand how commenting on the colors helps solve my problem. Please explain.
Re: OCILogon failing at one of my sites. [message #304654 is a reply to message #304635] Thu, 06 March 2008 00:54 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I'm sorry I don't know the answer, I just appreciate the effort and work you did in posting.

Regards
Michel
Re: OCILogon failing at one of my sites. [message #304708 is a reply to message #304654] Thu, 06 March 2008 05:40 Go to previous messageGo to next message
stockton
Messages: 10
Registered: July 2005
Location: South Africa
Junior Member
Bounce Apache and now how do I mark this thread Solved?

[Updated on: Thu, 06 March 2008 05:46]

Report message to a moderator

Re: OCILogon failing at one of my sites. [message #304712 is a reply to message #304708] Thu, 06 March 2008 05:50 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Thanks for the feedback.
Nothing has to be done to close the topic just saying it is solved. Smile

Regards
Michel
Previous Topic: Oracle 10g 10.2.01 Pro*Cobol Justification Issue
Next Topic: Database Links
Goto Forum:
  


Current Time: Sat Dec 10 06:44:28 CST 2016

Total time taken to generate the page: 0.07776 seconds