forum.coppermine-gallery.net
Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: bmd_online on July 31, 2005, 12:24:15 pm
-
When connecting to my gallery, I have this error :
While executing query "delete from `bmd.online`.cpg_sessions where time<1122742088 and remember=0;" on Resource id #5
mySQL error: Incorrect table name 'cpg_sessions'
(I have replaced my database name (from my provider) with "bmd.online". My real database name was "firstname.lastname").
In the file bridge/coppermine.inc.php, I have changed (lines 68-70)
$this->usertable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['users'];
$this->groupstable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['groups'];
$this->sessionstable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['sessions'];
like this (removed database name).
$this->usertable = $this->db['prefix'] . $this->table['users'];
$this->groupstable = $this->db['prefix'] . $this->table['groups'];
$this->sessionstable = $this->db['prefix'] . $this->table['sessions'];
Now, it works correctly.
Maybe it's due to "dot" in my database name ???
I'm using latest devel from CVS.
-
yes: database names mustn't contain dots! Not a coppermine issue, marking as "invalid"
-
It was due to my provider, it's not my fault !
Version 1.3 working correctly. With this change, 1.4.x works too.
In this topic (http://forum.coppermine-gallery.net/index.php?topic=17088.msg79964#msg79964), I read the same problem in another file :
If you replace that code with :
// Derived full table names
if (strpos($db_prefix, '.') === false) {
$this->usertable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['users'];
$this->groupstable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['groups'];
} else {
$this->usertable = $this->db['prefix'] . $this->table['users'];
$this->groupstable = $this->db['prefix'] . $this->table['groups'];
}
It will work for both 1.0.3 and 1.1 beta 1.
Should I commit this to devel?
-
That's not the same problem.
-
Sorry, never mind.