Hello.
First I'm not an expert, far from it, so maybe my mistake.
I start the page with
page_open(array("sess" => "Sid",
"auth" => "Example_Auth",
"perm" => "Permisito"
));
$perm->check("user");
.
.
some code
.
.
then I create new DB object for use with other things
$db2= new DB_Stuff();
.
.
//So far everything executes ok.
page_close();
================================
In local.inc I have 2 classes extending Db_Sql (DB_phplib
for use exclusivly by phplib and the other to take
advantage of the phplib func for other stuff)
class DB_phplib extends DB_Sql {
var $Host = "localhost";
var $Database = "phpliDB";
var $User = "user";
var $Password = "pass";
}
class DB_Stuff extends DB_Sql {
var $Host = "localhost";
var $Database = "Another DB";
var $User = "user2";
var $Password = "pass2";
}
Additionally,
class My_CT_Sql extends CT_Sql {
var $database_class = "DB_phplib";
var $database_table = "active_sessions";
}
class Sid extends Session {
var $classname = "Sid";
var $cookiename = "";
var $magic = "magic";
var $mode = "cookie";
var $fallback_mode = "get";
var $lifetime = 0;
var $that_class = "My_CT_Sql";
var $gc_probability = 5;
var $allowcache = "no";
}
=================================
The problem is that after performing couple queries with a
DB_Stuff object and finally calling page_close, it seems
phplib try to use DB_Stuff to perform their tasks and not
the DB_phplib.
So it ends with an error saying "can't find table
active_sessions" (that does not exist in the DB_Stuff db)
I thought I should report this.
Logged In: NO
It seems this a problem related to mysql or server setup and
not to phplib.
I tested it in a server of my own and works ok, but in a
webhosting I rented that offers 3 databases presents the
above problem.
I don't know.
Logged In: NO
I think there must be some error in ur code. Please check ur
code