Connect with remote oracle database from PHP

Discussion in 'PHP' started by asela_05085, Sep 3, 2009.

  1. #1
    hi,

    i need to connect to a remote oracle database from a PHP script.
    Do i need to install any drivers or packages to connect with the remote database?

    when i use below code

    <?php
    if ($c = oci_connect("username", "passwd", "remote server IP")) {
    echo "Successfully connected to Oracle.";
    oci_close($c);
    } else {
    $err = oci_error();
    echo "Oracle Connect Error " . $err['text'];
    }
    ?>


    it gives below error
    "PHP Fatal error: Call to undefined function: oci_connect() "

    I'm wondering whether i need to install any drivers

    pls advice someone

    thanks
     
    asela_05085, Sep 3, 2009 IP
  2. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
  3. asela_05085

    asela_05085 Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    it's bit complicated to me since I'm totally new to this.
    can i have a further explanation on this
     
    asela_05085, Sep 3, 2009 IP