Re: Tables in My PHP Admin missing/removed (not by me) Re: Tables in My PHP Admin missing/removed (not by me)
 

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

Re: Tables in My PHP Admin missing/removed (not by me)

Started by Joachim Müller, July 12, 2005, 09:22:25 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Joachim Müller

enable debug_mode to see what query actually fails.

xirishbutterfly

I've also been having this problem and I was told to go into the MYPHPADMIN and change debug mode in the table but the table somehow got deleted (not by me). Can you explain how else you can enable debug mode? I'm not a big wiz at this stuff.

Joachim Müller

if the config table is missing, restore it from your backup. If you don't have a backup, create it from scratch by running this query:#
# Table structure for table `CPG_config`
#

CREATE TABLE CPG_config (
  name varchar(40) NOT NULL default '',
  value varchar(255) NOT NULL default '',
  PRIMARY KEY  (name)
) TYPE=MyISAM;
# --------------------------------------------------------

INSERT INTO CPG_config VALUES ('albums_per_page', '12');
INSERT INTO CPG_config VALUES ('album_list_cols', '2');
INSERT INTO CPG_config VALUES ('display_pic_info', '0');
INSERT INTO CPG_config VALUES ('alb_list_thumb_size', '50');

#INSERT INTO CPG_config VALUES ('allowed_file_extensions', 'GIF/PNG/JPG/JPEG/TIF/TIFF');


# FOR USE WITH VIDEO MOD
INSERT INTO CPG_config VALUES ('allowed_mov_types', 'ALL');
INSERT INTO CPG_config VALUES ('allowed_doc_types', 'ALL');
INSERT INTO CPG_config VALUES ('allowed_snd_types', 'ALL');
INSERT INTO CPG_config VALUES ('allowed_img_types', 'ALL');


INSERT INTO CPG_config VALUES ('allow_private_albums', '1');
INSERT INTO CPG_config VALUES ('allow_user_registration', '0');
INSERT INTO CPG_config VALUES ('allow_duplicate_emails_addr', '0');
INSERT INTO CPG_config VALUES ('caption_in_thumbview', '1');
INSERT INTO CPG_config VALUES ('views_in_thumbview', '1');
INSERT INTO CPG_config VALUES ('charset', 'language file');
INSERT INTO CPG_config VALUES ('cookie_name', 'cpg133');
INSERT INTO CPG_config VALUES ('cookie_path', '/');
INSERT INTO CPG_config VALUES ('debug_mode', '0');
INSERT INTO CPG_config VALUES ('debug_notice', '0');
INSERT INTO CPG_config VALUES ('default_dir_mode', '0755');
INSERT INTO CPG_config VALUES ('default_file_mode', '0644');
INSERT INTO CPG_config VALUES ('default_sort_order', 'na');
INSERT INTO CPG_config VALUES ('ecards_more_pic_target', 'http://coppermine.sourceforge.net/');
INSERT INTO CPG_config VALUES ('enable_smilies', '1');
INSERT INTO CPG_config VALUES ('filter_bad_words', '0');
INSERT INTO CPG_config VALUES ('forbiden_fname_char', '$/\\\\:*?"\'<>|`');
INSERT INTO CPG_config VALUES ('fullpath', 'albums/');
INSERT INTO CPG_config VALUES ('gallery_admin_email', 'you@somewhere.com');
INSERT INTO CPG_config VALUES ('gallery_description', 'Your online photo album');
INSERT INTO CPG_config VALUES ('gallery_name', 'Coppermine Photo Gallery');
INSERT INTO CPG_config VALUES ('im_options', '-antialias');
INSERT INTO CPG_config VALUES ('impath', '');
INSERT INTO CPG_config VALUES ('jpeg_qual', '80');
INSERT INTO CPG_config VALUES ('keep_votes_time', '30');
INSERT INTO CPG_config VALUES ('lang', 'english');
INSERT INTO CPG_config VALUES ('main_page_layout', 'breadcrumb/catlist/alblist/random,2/lastup,2');
INSERT INTO CPG_config VALUES ('main_table_width', '100%');
INSERT INTO CPG_config VALUES ('make_intermediate', '1');
INSERT INTO CPG_config VALUES ('max_com_lines', '10');
INSERT INTO CPG_config VALUES ('max_com_size', '512');
INSERT INTO CPG_config VALUES ('max_com_wlength', '38');
INSERT INTO CPG_config VALUES ('max_img_desc_length', '512');
INSERT INTO CPG_config VALUES ('max_tabs', '12');
INSERT INTO CPG_config VALUES ('max_upl_size', '1024');
INSERT INTO CPG_config VALUES ('max_upl_width_height', '2048');
INSERT INTO CPG_config VALUES ('min_votes_for_rating', '1');
INSERT INTO CPG_config VALUES ('normal_pfx', 'normal_');
INSERT INTO CPG_config VALUES ('offline', '0');
INSERT INTO CPG_config VALUES ('picture_table_width', '600');
INSERT INTO CPG_config VALUES ('picture_width', '400');
INSERT INTO CPG_config VALUES ('randpos_interval', '1063623637');
INSERT INTO CPG_config VALUES ('read_exif_data', '0');
INSERT INTO CPG_config VALUES ('reg_requires_valid_email', '1');
INSERT INTO CPG_config VALUES ('subcat_level', '2');
INSERT INTO CPG_config VALUES ('theme', 'classic');
INSERT INTO CPG_config VALUES ('thumbcols', '4');
INSERT INTO CPG_config VALUES ('thumbrows', '3');
INSERT INTO CPG_config VALUES ('thumb_method', 'im');
INSERT INTO CPG_config VALUES ('thumb_pfx', 'thumb_');
INSERT INTO CPG_config VALUES ('thumb_width', '100');
INSERT INTO CPG_config VALUES ('userpics', 'userpics/');
INSERT INTO CPG_config VALUES ('user_field1_name', '');
INSERT INTO CPG_config VALUES ('user_field2_name', '');
INSERT INTO CPG_config VALUES ('user_field3_name', '');
INSERT INTO CPG_config VALUES ('user_field4_name', '');
INSERT INTO CPG_config VALUES ('display_comment_count', '0');
INSERT INTO CPG_config VALUES ('show_private', '0');
INSERT INTO CPG_config VALUES ('first_level', '1');
INSERT INTO CPG_config VALUES ('display_film_strip', '1');
INSERT INTO CPG_config VALUES ('max_film_strip_items', '5');
INSERT INTO CPG_config VALUES ('thumb_use', 'any');
INSERT INTO CPG_config VALUES ('comment_email_notification', '0');
#INSERT INTO CPG_config VALUES ('disable_popup_rightclick', '0');
#INSERT INTO CPG_config VALUES ('disable_gallery_rightclick', '0');
INSERT INTO CPG_config VALUES ('read_iptc_data', '0');
INSERT INTO CPG_config VALUES ('reg_notify_admin_email', '0');
INSERT INTO CPG_config VALUES ('disable_comment_flood_protect', '0');
INSERT INTO CPG_config VALUES ('upl_notify_admin_email', '0');
INSERT INTO CPG_config VALUES ('display_uploader', '0');

INSERT INTO CPG_config VALUES ('language_list', '0');
INSERT INTO CPG_config VALUES ('language_flags', '0');
INSERT INTO CPG_config VALUES ('theme_list', '0');
INSERT INTO CPG_config VALUES ('language_reset', '1');
INSERT INTO CPG_config VALUES ('theme_reset', '1');

INSERT INTO CPG_config VALUES ('allow_memberlist', '0');
INSERT INTO CPG_config VALUES ('display_faq', '0');
INSERT INTO CPG_config VALUES ('show_bbcode_help', '1');
INSERT INTO CPG_config VALUES ('log_ecards', '0');
INSERT INTO CPG_config VALUES ('email_comment_notification', '0');
INSERT INTO CPG_config VALUES ('enable_zipdownload', '1');
INSERT INTO CPG_config VALUES ('slideshow_interval', '5000');
(replace "CPG_" in the query with the actual prefix you chose during coppermine install, e.g. "cpg133_"). However, if you're sure that it wasn't you who deleted the table, find out first why it got deleted (hacking?). Ask your webhost for help. As running this query will set your page to the default values, you'll have to go to coppermine's config and re-adjust the values by heart once the restore worked.

xirishbutterfly

I'm not sure if this is considered double posting and I'm sorry if it is but now I get this message when I go to my gallery:
"Fatal error :
There was an error while processing a database query"
I did what you said to do and then I ran update.php but now I just get that message. Again, sorry if that's considered double-posting.

Joachim Müller

enable debug_mode in coppermine's config to see what query actually fails (as suggested 3 posts up). If you can't enabled debug_mode using coppermine's config user interface, you can directly enable it in your database, using phpMyAdmin or similar: browse coppermine's config table and set debug_mode from "0" to "1". Post the "query error" then (not the debug output).

xirishbutterfly

thanx. So i did that and here's what I get on the gallery page now below the message:
"While executing query "SELECT * FROM cpg132_users WHERE user_id='0'AND user_active = 'YES' AND user_password != '' AND BINARY MD5(user_password) = '*'" on 0

mySQL error: Table 'unforgivable-curses_com_-_mysql.cpg132_users' doesn't exist"

Joachim Müller

the error message says it all: your user table doesn't exist. Rebuild it as well, or go for a fresh install. Ask your webhost why all the tables have disappeared (ask them to look into the logs), and if they have a backup of the tables.

xirishbutterfly

k. But I don't know how to re-build the tables. And if I install it over again, will I loose all of my images? Sorry for all the questions. I'm not a computer code wiz.

Joachim Müller

take a look at the file sql/schema.sql (open it with a text editor). It contains the queries needed to build tables. You'll have to manually change your table prefix, then run the query#
# Table structure for table `CPG_users`
#

CREATE TABLE CPG_users (
  user_id int(11) NOT NULL auto_increment,
  user_group int(11) NOT NULL default '2',
  user_active enum('YES','NO') NOT NULL default 'NO',
  user_name varchar(25) NOT NULL default '',
  user_password varchar(25) NOT NULL default '',
  user_lastvisit datetime NOT NULL default '0000-00-00 00:00:00',
  user_regdate datetime NOT NULL default '0000-00-00 00:00:00',
  user_group_list varchar(255) NOT NULL default '',
  user_email varchar(255) NOT NULL default '',
  user_website varchar(255) NOT NULL default '',
  user_location varchar(255) NOT NULL default '',
  user_interests varchar(255) NOT NULL default '',
  user_occupation varchar(255) NOT NULL default '',
  user_actkey varchar(32) NOT NULL default '',
  PRIMARY KEY  (user_id),
  UNIQUE KEY user_name (user_name)
) TYPE=MyISAM;
# --------------------------------------------------------
. However, I wouldn't recommend this if you have little idea what you're doing. As suggested above: ask your webhost for support first.