Welcome Guest, Not a member yet? Register   Sign In
[RESOLVED!!!] ORA-24374: CodeIgniter 1.70 connecting Oracle
#1

[eluser]jcavard[/eluser]
I am trying to get CI 1.70 to talk to Oracle and I keep getting the following error
Code:
A PHP Error was encountered

Severity: Warning

Message: ocifetchinto() [function.ocifetchinto]: ORA-24374: définition non exécutée après extraction ou exécution et extraction

Filename: oci8/oci8_result.php

Line Number: 155

Has anyone ever been able to get Oracle working on CI? I read on a few forums that this error come up quite often. I tried connecting to a Orace 10g express DB, and Oracel 9 as well, both gives me error.

Any help is really appreciated!
#2

[eluser]jcavard[/eluser]
bump!
#3

[eluser]jcavard[/eluser]
I finally got it! Thanks to this post over at techxplorer.

Here is a cut & paste of the solution, I give all credits to techxplorer.com.
Quote:1. Edit the driver [1]

Open the system/database/drivers/oci8/oci8_driver.php file
Navigate to line 162 to the _set_stmt_id function
Remove the check to see if the stmt_id variable is set. With the check in place the driver will attempt to re-use an existing stmt_id and only your first SQL statement will work as you expect. For example:

Code:
//if ( ! is_resource($this->stmt_id))  
//{  
//    $this->stmt_id = ociparse($this->conn_id, $this->_prep_query($sql));  
//}  
$this->stmt_id = ociparse($this->conn_id, $this->_prep_query($sql));
1. Edit the driver [2]

Keep the system/database/drivers/oci8/oci8_driver.php file open
Navigate to line 375 to the escape_str function
Replace the call to the _remove_invisible_characters function with the code below

Code:
function escape_str($str)  
{  
    // Access the CI object  
    $CI =& get_instance();  
  
    //return $CI->_remove_invisible_characters($str);  
    return $CI->input->_remove_invisible_characters($str);  
  
}
#4

[eluser]Jbeetle[/eluser]
Still BUG with reference cursor call.

Code:
$cursor = $this->db->get_cursor();
        $this->db->stored_procedure("jile","get_roles" ,array
            (array
                ('name' => ':cRoles',
                 'value' => $cursor,
                 'type' => OCI_B_CURSOR,
                 'length' => -1)
                 )
             );




Theme © iAndrew 2016 - Forum software by © MyBB