OCILogon Fails But OCIError Returns False.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Akino877
    New Member
    • Nov 2007
    • 37

    OCILogon Fails But OCIError Returns False.

    Hello,

    I am writing a simple PHP script to see if I can make a connection to my Oracle database. And it showed that my call to OCILogon() failed. But
    my call to OCIError() returned "False", which I believe meant to be "no
    error found".

    I wonder if you could please help me get additional information as to why
    my call to OCILogon() failed? My code is below.

    Thank you and Best Regards,

    Akino
    =============== =============== =============== ============

    Code :
    ====
    [code=php]
    <?php
    echo "Connecting...< br/>";
    $c = OCILogon("abc12 3", "abc123", "testDB");
    if ($c == false) {
    $err = OCIError();
    if ($err == false)
    echo "No error found.<br/>";
    else
    echo "Oracle Connect Error " . $err&#91;code] . $err[message] . "<br/>";
    }
    else {
    echo "Successful ly connected to testDB<br/>";
    OCILogoff($c);
    }
    echo "Exiting... <br/>";
    ?>
    [/code]
    Output :
    =====

    Connecting...
    No error found.
    Exiting...
    Last edited by pbmods; Feb 20 '09, 05:48 AM. Reason: Added CODE tags.
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    you might have a look here and check whether all preliminaries are fullfilled ... correct php.ini, installed oracle-client etc.

    kind regards

    Comment

    Working...