php - ion_auth fails when get another database instance -


in project, work 2 databases, in parts when need use secondary database, use:

$newdb = $this->load->database("otherdb", true); 

or

$ci =& get_instance(); $newdb = $ci->load->database("otherdb",true); 

to de instance.

but when this, ion_auth fails keep connection original database , throw 2 errors:

call member function result()  

in get_users_groups function, and:

trying property of non-object 

in link_menu_acl function.

i tried forcing reload default databse, "fixed" first problem.

my guess when load secondary database, ion_auth lose connection default database, don't know how keep or reconnect use both databases.

ok, problem main , secondary databases, had set "true" in persistent connect configuration, seems ion_auth "found" secondary connection , tried query on and, possible because "unknown error" returned false instead object.

changing secondary database "pconnect" "false", solved problem.

i don't understand why didn't throw "no table in database" error instead of "false"


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -