Welcome Guest, Not a member yet? Register   Sign In
CI 2.1 Session Issue w/ Oracle
#1

[eluser]ee99ee[/eluser]
We just deployed CI 2.1 against Oracle for session data storage. We are getting the following error on load:

Code:
A PHP Error was encountered
Severity: Warning
Message: oci_fetch_assoc() [function.oci-fetch-assoc]: ORA-01002: fetch out of sequence
Filename: oci8/oci8_result.php
Line Number: 155

This error is being triggered here (Session.php, line 216):

Code:
// No result?  Kill it!
if ($query->num_rows() == 0) // <--- fails here
{
$this->sess_destroy();
return FALSE;
}

I verified the schema of CI_SESSIONS is correct. Here is the setting of database.php:

Code:
$active_group = 'default';
$active_record = TRUE;

$db['default']['hostname'] = '(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = database.server)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = ******)))';
$db['default']['username'] = '*******';
$db['default']['password'] = '*******';
$db['default']['database'] = '*******';
$db['default']['dbdriver'] = 'oci8';
$db['default']['dbprefix'] = 'SCHEMA_OWNER.';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;

Any ideas?

-Chris
#2

[eluser]Unknown[/eluser]
the following did the trick for me:

in system/database/drivers/oci8/oci8_result.php

change line 155:
Code:
return oci_fetch_assoc($id);

to
Code:
return @oci_fetch_assoc($id);
#3

[eluser]ee99ee[/eluser]
I really don't like the idea of having to modify core database library files. Any other way around this? I'll give this a shot, though...

-Chris
#4

[eluser]CroNiX[/eluser]
You might try the version from github. I saw a recent commit that reported a lot of oracle fixes.
#5

[eluser]ee99ee[/eluser]
[quote author="mm30" date="1326891076"]the following did the trick for me:

in system/database/drivers/oci8/oci8_result.php

change line 155:
Code:
return oci_fetch_assoc($id);

to
Code:
return @oci_fetch_assoc($id);
[/quote]

That fixed the problem for me too.

-Chris
#6

[eluser]kreamik[/eluser]
i just download from git with stable release for 2.1.*
stil get this problem .. so i add '@' to pass the error warning ..

hope will fix soon in the next stable release ..

any one can suggest to update CI soon as we see some debug is found and critical ..
#7

[eluser]CroNiX[/eluser]
It probably won't get fixed unless the people experiencing the problems fill out an actual bug report. If its just in the forums, chances are very high it won't even get noticed. I hardly ever see anyone from EllisLab or the Reactor engineers in the forums anymore. The percentage of people who use Oracle is very small...so chances this stuff will get fixed is very low. Come up with fixes and submit pull requests if you want things fixed faster.
#8

[eluser]CroNiX[/eluser]
And here is the pull request I was referring to:
https://github.com/EllisLab/CodeIgniter/pull/868

Check out the comments.
It hasn't been accepted or merged yet...so...
#9

[eluser]kreamik[/eluser]
so we have to be quite and patient to wait for the change .. Smile

i'll try to use adodb if i have more difficulties


CI do alot for me since i used it last 2 years ..
so i only know CI and will wait if it has been fixed
#10

[eluser]InsiteFX[/eluser]
Try
Code:
$db['default']['pconnect'] = FALSE;




Theme © iAndrew 2016 - Forum software by © MyBB