oracle php connectivity

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Noorain
    New Member
    • Mar 2008
    • 57

    oracle php connectivity

    i installed xampp & oracle 9i. iu sed following connectivity between php & oracle.

    Code:
    <?
    $username="scott";
    $password="tiger";
    $servicename="noor";
    
    $conn = oci_connect('$username', '$password', '$servicename'); 
    if (!$conn){ 
    $e = oci_error(); 
    print htmlentities($e['message']); 
    exit; 
    } 
    else{ 
    echo 'Connection Success!!.'; 
    } 
    ?>
    but its show following message:
    Fatal error: Call to undefined function oci_connect() in D:\Program Files\xampp\htd ocs\ora-tst\test.php on line

    please help how to solve this
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    This may be of some help.

    Comment

    • zorgi
      Recognized Expert Contributor
      • Mar 2008
      • 431

      #3
      Did you edit php.ini? If not try uncommenting following lines

      ;php_oci8.dll
      ;php_pdo_oci.dl l

      Comment

      • Noorain
        New Member
        • Mar 2008
        • 57

        #4
        Thank ypu

        ya, i edit two lines in php.ini file. but the connection is not active

        Comment

        • zorgi
          Recognized Expert Contributor
          • Mar 2008
          • 431

          #5
          Is phpinfo showing the oracle extension installed?

          Comment

          Working...