forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 install => Topic started by: Pascal YAP on December 12, 2005, 08:48:59 am

Title: mySQL error: Incorrect table name 'cpg140_sessions'
Post by: Pascal YAP on December 12, 2005, 08:48:59 am
Mornin'

Just after a new 1.4.2 install, who's OK, and after LET'S GO button, i receve a blank page with only a Fatal error :
After activate Debug-Mod via PhpMyAdmin, look at the result :
Code: [Select]
While executing query "delete from `pays-dignois.com`.cpg140_sessions where time<1134369764 and remember=0;" on Resource id #5
mySQL error: Incorrect table name 'cpg140_sessions'

What's the matter ?
thanx
Link : www.pays-dignois.com/galerie

Not solved in our French Board  ;)
PYAP
Title: Re: mySQL error: Incorrect table name 'cpg140_sessions'
Post by: Nibbler on December 12, 2005, 11:08:52 am
Don't use dots in your database name.
Title: Re: mySQL error: Incorrect table name 'cpg140_sessions'
Post by: Pascal YAP on December 12, 2005, 03:43:17 pm
Nibbler,
YES  >:(
But i try to replace DOT by underscore ( _ ) and no result at all )-:
My database name is "pays-dignois.com on host pays-dignois.com.sql-blabla.blabla.net"
I try many solutions on CONFIG.INC.PHP with undescore "_", other prefix table...
Replace all CPG1.4.2 package many time with different FTP protocol (auto, binary, text)
Create a directory SESSIONS, temp, TMP.....

Here is my CONFIG.INC.PHP (with no password  ;) )
Code: [Select]
<?php
// Coppermine configuration file
// MySQL configuration
$CONFIG['dbserver'] = 'sql.pays-dignois.com';
$CONFIG['dbuser'] = 'pays-dignois.com';
$CONFIG['dbpass'] = 'BLABLABLA';
$CONFIG['dbname'] = 'pays-dignois.com';
// MySQL TABLE NAMES PREFIX
$CONFIG['TABLE_PREFIX'] = 'cpg140_';
?>
I make some mod with pays_dignois_com, pays-dignois_com, pays_dignois, pays_dignois.... and no result ! do'nt understand why

PYAP
Title: Re: mySQL error: Incorrect table name 'cpg140_sessions'
Post by: Nibbler on December 12, 2005, 03:46:51 pm
No need to try all those things, the problem is a simple one. You need to get that database renamed because it has an illegal name.
Title: Re: mySQL error: Incorrect table name 'cpg140_sessions'
Post by: Pascal YAP on December 12, 2005, 03:53:32 pm
Nibbler,
Quote
You need to get that database renamed because it has an illegal name
sh33t ! I cannot  >:( Fixed by my host, with no possibility to change this name..
Stay on 1.3.5  ;D

PYAP
Title: Re: mySQL error: Incorrect table name 'cpg140_sessions'
Post by: Nibbler on December 12, 2005, 03:57:13 pm
OK then, plan B is to hack the code.

bridge/coppermine.inc.php

Code: [Select]
$this->sessionstable =  '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['sessions'];
change to

Code: [Select]
$this->sessionstable =  $this->db['prefix'] . $this->table['sessions'];
Title: Re: mySQL error: Incorrect table name 'cpg140_sessions'
Post by: Pascal YAP on December 12, 2005, 04:11:46 pm
Nibbler, :D

No need to have a PLAN C
You're fine...
It's OK for me !
You are F O R M I D A B L E
Many Thanx
(i return on French Board  (http://forum.coppermine-gallery.net/index.php?board=38.0) to share your solution)
this TOPIC in Français : http://forum.coppermine-gallery.net/index.php?topic=24876.0


PYAP
Title: Re: mySQL error: Incorrect table name 'cpg140_sessions'
Post by: Pascal YAP on December 12, 2005, 04:55:48 pm
Nibbler,
All,

after login, new Fatal error : on usertable and groupstable, but now it's not an horror !
I need  to alter other pieces of code like this :
Code: [Select]
                // Derived full table names
//              $this->usertable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['users'];
                $this->usertable = $this->db['prefix'] . $this->table['users'];
//              $this->groupstable =  '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['groups'];
                $this->groupstable = $this->db['prefix'] . $this->table['groups'];
//              $this->sessionstable =  '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['sessions'];
                $this->sessionstable =  $this->db['prefix'] . $this->table['sessions'];

Thanx again

PYAP