mySQL error: Incorrect table name 'cpg140_sessions' mySQL error: Incorrect table name 'cpg140_sessions'
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

mySQL error: Incorrect table name 'cpg140_sessions'

Started by Pascal YAP, December 12, 2005, 08:48:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pascal YAP

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 :
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

Nibbler


Pascal YAP

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  ;) )
<?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

Nibbler

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.

Pascal YAP

Nibbler,
QuoteYou 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

Nibbler

OK then, plan B is to hack the code.

bridge/coppermine.inc.php

$this->sessionstable =  '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['sessions'];

change to

$this->sessionstable =  $this->db['prefix'] . $this->table['sessions'];

Pascal YAP

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 to share your solution)
this TOPIC in Français : http://forum.coppermine-gallery.net/index.php?topic=24876.0


PYAP

Pascal YAP

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 :
                // 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