coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upgrading => Topic started by: h4nh4n on March 08, 2007, 09:07:59 AM

Title: Moved server, problem with the sql
Post by: h4nh4n on March 08, 2007, 09:07:59 AM
I am using Coppermine Photo Gallery v1.4.8 in the old webserver then I installed a new version of the gallery (1.4.10) on the new server, I try to import the old sql  to the new server and I got an error in phpmyadmin:
Error

MySQL said: Documentation
#1062 - Duplicate entry 'disk?' for key 1

I have tried to search 'disk?' but no luck, can't find it.

when I try to access to the homepage/index of the gallery it showing
While executing query "SELECT * FROM cpg_config" on 0

mySQL error: Table 'h4nh4n_copp1.cpg_config' doesn't exist


Anyone know what's the problem?

Thanks in advance :)
Title: Re: Moved server, problem with the sql
Post by: h4nh4n on March 08, 2007, 10:27:53 AM
Okay, I have fixed the problem in phpmyadmin (just compared the new one and old one).

However I still got an error msg in index, and I think its because the table names are different between two version.

for example table for banned in the old version
--
-- Table structure for table `cpg148_banned`
--

DROP TABLE IF EXISTS `cpg148_banned`;
CREATE TABLE `cpg148_banned` (
  `ban_id` int(11) NOT NULL auto_increment,
  `user_id` int(11) default NULL,
  `ip_addr` tinytext,
  `expiry` datetime default NULL,
  `brute_force` tinyint(5) NOT NULL default '0',
  PRIMARY KEY  (`ban_id`)
) TYPE=MyISAM;



and the new one like
--
-- Table structure for table `cpg_banned`
--

CREATE TABLE `cpg_banned` (
  `ban_id` int(11) NOT NULL auto_increment,
  `user_id` int(11) default NULL,
  `ip_addr` tinytext collate latin1_general_ci,
  `expiry` datetime default NULL,
  `brute_force` tinyint(5) NOT NULL default '0',
  PRIMARY KEY  (`ban_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;
Title: Re: Moved server, problem with the sql
Post by: Tranz on March 08, 2007, 12:53:29 PM
In include/config.inc.php, you will need to update the table prefix variable.
Title: Re: Moved server, problem with the sql
Post by: h4nh4n on March 09, 2007, 10:33:12 PM
thanks TranzNDance,

the problem has been solved  :D