Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: mySQL error: Incorrect table name 'cpg140_sessions'  (Read 11386 times)

0 Members and 1 Guest are viewing this topic.

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
mySQL error: Incorrect table name 'cpg140_sessions'
« 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
« Last Edit: December 12, 2005, 04:33:54 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: mySQL error: Incorrect table name 'cpg140_sessions'
« Reply #1 on: December 12, 2005, 11:08:52 am »

Don't use dots in your database name.
Logged

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: mySQL error: Incorrect table name 'cpg140_sessions'
« Reply #2 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
« Last Edit: December 12, 2005, 03:50:07 pm by PYAP »
Logged

Nibbler

  • Guest
Re: mySQL error: Incorrect table name 'cpg140_sessions'
« Reply #3 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.
Logged

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: mySQL error: Incorrect table name 'cpg140_sessions'
« Reply #4 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
Logged

Nibbler

  • Guest
Re: mySQL error: Incorrect table name 'cpg140_sessions'
« Reply #5 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'];
Logged

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: mySQL error: Incorrect table name 'cpg140_sessions'
« Reply #6 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 to share your solution)
this TOPIC in Français : http://forum.coppermine-gallery.net/index.php?topic=24876.0


PYAP
« Last Edit: December 12, 2005, 04:23:57 pm by PYAP »
Logged

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: mySQL error: Incorrect table name 'cpg140_sessions'
« Reply #7 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
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.