EllisLab text mark
Advanced Search
     
[RESOLVED!!!] ORA-24374: CodeIgniter 1.70 connecting Oracle
Posted: 23 January 2009 03:48 PM
Joined: 2008-11-10
139 posts

I am trying to get CI 1.70 to talk to Oracle and I keep getting the following error

A PHP Error was encountered

Severity
Warning

Message
ocifetchinto() [function.ocifetchinto]ORA-24374dé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!

 Signature 

I
C I

 
Posted: 26 January 2009 04:13 PM   [ # 1 ]   [ Rating: 0 ]
Joined: 2008-11-10
139 posts

bump!

 Signature 

I
C I

 
Posted: 27 January 2009 04:09 PM   [ # 2 ]   [ Rating: 0 ]
Joined: 2008-11-10
139 posts

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.

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:

//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

function escape_str($str)  
{  
    
// Access the CI object  
    
$CI =& get_instance();  
  
    
//return $CI->_remove_invisible_characters($str);  
    
return $CI->input->_remove_invisible_characters($str);  
  
 Signature 

I
C I

 
Posted: 28 October 2009 11:37 AM   [ # 3 ]   [ Rating: 0 ]
Joined: 2009-10-28
4 posts

Still BUG with reference cursor call.

$cursor $this->db->get_cursor();
        
$this->db->stored_procedure("jile","get_roles" ,array
            (array
                (
'name' => ':cRoles',
                 
'value' => $cursor,
                 
'type' => OCI_B_CURSOR,
                 
'length' => -1)
                 )
             ); 
 
Posted: 03 October 2011 04:36 AM   [ # 4 ]   [ Rating: 0 ]
Joined: 2010-07-22
2 posts

i got the same issue with this, please any help?

Jbeetle - 28 October 2009 11:37 AM

Still BUG with reference cursor call.

$cursor $this->db->get_cursor();
        
$this->db->stored_procedure("jile","get_roles" ,array
            (array
                (
'name' => ':cRoles',
                 
'value' => $cursor,
                 
'type' => OCI_B_CURSOR,
                 
'length' => -1)
                 )
             ); 
 
Posted: 06 November 2011 03:00 AM   [ # 5 ]   [ Rating: 0 ]
Joined: 2011-11-06
1 posts

Any one got it resolved ?