NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] OCIStmtPrepare2 Could not be located.


Joined: 09 Jul 2007
Posts: 1
Reply with quote
Hi,

This is my first post, but I have searched and not seen this question posted before. If it has please just point me to a post....

Enough of the disclaimer... Wink

I am trying to connect to both a MySQL database and an Oracle database. The connection to the MySQL database works perfectly however when I edit the php.ini file and uncomment the line "extension=php_oci8.dll" I am getting the error below. I haven't even added my code to the script. I have only uncommented the line. Has anyone seen this? Anyone have suggestions?





Here is the code. Like I said I have not added the Oracle OCI code yet, but I still get the error above.... I have commented out the databasename, username, and password with *****... I trust you, just not that much Wink

Code:

<?php

  $conn = @new mysqli('**********.**********.*****', '******', '*********', '****************');
   
  if(mysqli_connect_errno() != 0)
  {
    $errno  = mysqli_connect_errno();
    $errmsg = mysqli_connect_error();
    echo "Connect Failed with: ($errno) $errmsg<br/>\n";
    exit;       
  }                                         
                   
  $conn->query("SET NAMES 'utf8'");
   
  // prepare the query
  $query_str = "select trans_ref_no from TransHeader";
  $result = @$conn->query($query_str);

  if ($result == FALSE)
  {
    $errno  = $conn->errno;
    $errmsg = $conn->error;

    echo "Connect Select Failed with: ($errno) $errmsg<br/>\n";
    $conn->close();
    exit;
  }

  while(($row_data = @$result->fetch_assoc()) != NULL)
  {
    echo "{$row_data['trans_ref_no']}<br/>\n";
  }

  $conn->close();
?>

_________________
JG
View user's profileFind all posts by JimGSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
Checkout this, perhaps it helps. Seems it has to do with the path and so on.
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
I think that php_oci8.dll is not compatible with OCI that comes with Oracle 10/11
You may want to try oci that comes with Oracle 9 client.
Anyway, please note that php_oci8.dll is part of PHP official distribution and all bugs should be reported at http://bugs.php.net/

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
[resolved] OCIStmtPrepare2 Could not be located.
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic