Advanced search  

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]

Pages: [1]   Go Down

Author Topic: [Solved]: Problem restoring database  (Read 5419 times)

0 Members and 1 Guest are viewing this topic.

zyuray

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
[Solved]: Problem restoring database
« on: June 28, 2004, 05:50:36 pm »

I moved to a new server and this is what I did step by step:

On the old server, in SSH:
mysqldump gallery > gallery.sql

I transferred gallery.sql to my new server
I uploaded all Coppermine files to the new server.
I transferred all album folders to the new server into the same locations.

On the new server, in SSH:
mysqladmin create gallery

I ran the install.php script, connecting to 'gallery'
Coppermine is up and running, but blank

On the new server in SSH:
mysqladmin drop gallery
mysqladmin create gallery
mysql gallery < gallery.sql

Now this appears when I visit the site:

Fatal error :
There was an error while processing a database query

Did I do something incorrectly?
« Last Edit: June 29, 2004, 09:54:09 am by GauGau »
Logged

Nibbler

  • Guest
Re: Problem restoring database
« Reply #1 on: June 28, 2004, 06:12:24 pm »

Check the table name prefix in config.inc.php, then enable debug mode directly in the database (config table, debug mode -> 1) and see what the failed query was.
Logged

zyuray

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Problem restoring database
« Reply #2 on: June 28, 2004, 06:27:14 pm »

I enabled debug mode, and it told me that the "cpg_filetypes" table was missing, which was true - it was not in the database after the restore.

I copied the entire cpg_filetypes table from a fresh Coppermine installation, and now I get this:

Notice: Undefined index: allowed_doc_types in /home/rbase/public_html/include/media.functions.inc.php on line 38

Notice: Undefined index: allowed_doc_types in /home/rbase/public_html/include/media.functions.inc.php on line 38

Notice: Undefined index: allowed_doc_types in /home/rbase/public_html/include/media.functions.inc.php on line 38

Notice: Undefined index: allowed_doc_types in /home/rbase/public_html/include/media.functions.inc.php on line 38

Notice: Undefined index: user_group_list in /home/rbase/public_html/include/init.inc.php on line 273
Fatal error :
There was an error while processing a database query
Logged

Nibbler

  • Guest
Re: Problem restoring database
« Reply #3 on: June 28, 2004, 06:40:39 pm »

Run the update.php.
Logged

zyuray

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Problem restoring database
« Reply #4 on: June 28, 2004, 06:52:55 pm »

Thanks.

Looks like I was restoring a 1.2.1 db onto a 1.3.0 installation.

Oopsie
Logged

zyuray

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Problem restoring database
« Reply #5 on: June 28, 2004, 07:20:06 pm »

Ok, so I restored everything with 1.2.1 and it worked fine. Then I followed the upgrade 1.3.0 directions. After running update.php, the following occurs:

While executing query "SELECT cid, name, description, thumb FROM cpg_categories WHERE parent = ''  ORDER BY pos" on 0

mySQL error: Unknown column 'thumb' in 'field list'
Logged

Nibbler

  • Guest
Re: Problem restoring database
« Reply #6 on: June 28, 2004, 07:37:10 pm »

Adding the thumb column should be done by update.php, make sure the user you are running coppermine under has permission to do ALTERS on your database.
Logged

zyuray

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Problem restoring database
« Reply #7 on: June 28, 2004, 07:47:47 pm »

The user does have alter privileges.
This is all the update.php file reports doing:

ALTER TABLE cpg_comments add msg_raw_ip tinytext Already Done
ALTER TABLE cpg_comments add msg_hdr_ip tinytext Already Done
ALTER TABLE cpg_pictures add pic_raw_ip tinytext Already Done
ALTER TABLE cpg_pictures add pic_hdr_ip tinytext Already Done
INSERT INTO cpg_config VALUES ('thumb_use', 'any') Already Done
INSERT INTO cpg_config VALUES ('show_private', '0') Already Done
INSERT INTO cpg_config VALUES ('first_level', '1') Already Done
INSERT INTO cpg_config VALUES ('display_film_strip', '1') Already Done
INSERT INTO cpg_config VALUES ('max_film_strip_items', '5') Already Done
INSERT INTO cpg_config VALUES ('comment_email_notification', '0') Already Done
CREATE TABLE cpg_banned ( ban_id int(11) NOT NULL auto_increment, user_id int(11) DEFAULT NULL, ip_addr tinytext DEFAULT NULL, expiry datetime DEFAULT NULL, PRIMARY KEY (ban_id) ) TYPE=MyISAM Already Done
Upgrade completed
Coppermine is now upgraded and ready to roll.
 

Let's continue !
Logged

Nibbler

  • Guest
Re: Problem restoring database
« Reply #8 on: June 28, 2004, 07:58:09 pm »

You are using the 1.2 version of update.sql - all your files have to be the 1.3 version.
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Problem restoring database
« Reply #9 on: June 28, 2004, 07:59:49 pm »

Can you check the database to see if it has been created.  'already done' is given when the action is not required, but also when the action fails.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

zyuray

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Problem restoring database
« Reply #10 on: June 28, 2004, 08:43:14 pm »

Re-verified my steps. All works now. Thanks guys
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.