forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: bree on September 27, 2005, 03:44:34 pm

Title: Restore factory settings
Post by: bree on September 27, 2005, 03:44:34 pm
Okay I managed to accidently hit the restore factory settings button instead of the save new configuration one in the config section. I copied all of the info from the config page by clicking the back button but once I tried to re-enter it nothing happens. I am assuming I probably need to do something other than that. I didn't install coppermine myself a friend did it for me so can someone please help me figure out how to get the gallery back to the way it was. The users list is viewable and all of the albums are still online (I checked in my FTP) but none of the albums or pictures can be viewed. It just says there is an error processing a database query. I have no idea how to fix the problem so any help would be very appreciated. Please and thanks!
Title: Re: Restore factory settings
Post by: Azrayen on September 27, 2005, 03:52:07 pm
Please post a link to your gallery.

First clue : What are the tables prefixes in your database ? if they've been changed by your friend during installation, that can be the source of the problem.

Azy
Title: Re: Restore factory settings
Post by: bree on September 27, 2005, 04:01:26 pm
The link to the gallery is:

http://www.michelletrachtenberg.net/gallery

As you can see it has just reverted to the default coppermine layout. I have tried to key in the older settings and then click save new configuration it says it has been configured but then when I click continue it says there was an error processing a database query I'd appreciate any help whatsoever. What do you mean by table prefixes? I am fairly new to coppermine so I really only use the batch add files and album managing function. Thanks for such a quick reply :)
Title: Re: Restore factory settings
Post by: Azrayen on September 27, 2005, 04:18:42 pm
OK, a problem in the database should be corrected with phpMyAdmin.

Let's try to find first where is the error. Could you, as an admin, go in the config page and select YES (everyone) for the two last options (Enable debug mode and Display notices in debug mode)

Tx
Azy


What do you mean by table prefixes?
A table is part of a database. Coppermine's database use 13 tables, which names all begin by the same prefix (in my gallery it's cpg133_ )
Title: Re: Restore factory settings
Post by: bree on September 27, 2005, 04:39:45 pm
Okay I've changed the settings in the config page. The table prefix I had in before I reset it was cgp132. Thanks again for the help!
Title: Re: Restore factory settings
Post by: Azrayen on September 27, 2005, 04:43:46 pm
Sorry but I cannot see any change (debug mode).

Could you contact me by msn ? I send you my address by MP.

Azy
Title: Re: Restore factory settings
Post by: bree on September 27, 2005, 04:57:38 pm
I've gone back into configuration and the options I had selected for debug mode switched back to the opposite. The config page won't seem to save anything I put in there. Right now I have to be getting to bed. It is 1am! I will add you to my MSN tomorrow morning and hopefully it can be fixed. If anyone else can help with the matter please post, it'd be much appreciated!
Title: Re: Restore factory settings
Post by: Azrayen on September 27, 2005, 05:12:32 pm
Well,
Download and open your config.inc.php file. (in "include" folder)
Check the value shown in red is correct for your database (to see what table prefix is used in your database, use phpMyAdmin - example in screenshot below)

Quote
// MySQL TABLE NAMES PREFIX
$CONFIG['TABLE_PREFIX'] =                'cpg133_';

If it's not, correct it, save the file and upload it back on you server.

For me it's 5:10 PM, so I'm not sure to be available tomorrow "morning" (for you).
Good luck anyway,
Azy

PS : Screenshot of phpMyAdmin (database management software, see your webhost if you don't know how to access/use it)
Title: Re: Restore factory settings
Post by: bree on September 28, 2005, 03:20:14 am
I did what you said downloaded the file, opened it in notepad and changed it to 133 but it made the problem worse. It said:

Notice: Undefined index: debug_mode in /usr/home/michelle/public_html/gallery/include/functions.inc.php on line 96
Fatal error :
There was an error while processing a database query

I made a backup of the file so I uploaded that it is is back to the basic defaullt layout like it was before. I have no idea how to fix the problem at all! Do I need to edit the config file from the gallery directory to have all the variables I want and then upload that? Would that work? The gallery still has the albums and user functions but nothing else works. Help please!?
Title: Re: Restore factory settings
Post by: Joachim Müller on September 28, 2005, 09:32:33 am
Fatal error :
There was an error while processing a database query
Enable debug mode in coppermine's config table (set it from 0 to 1) to see the actual query that failed.
Title: Re: Restore factory settings
Post by: artistsinhawaii on September 28, 2005, 10:25:09 am
I see this error.  When I click on the links of her site.


Notice: Undefined index: cookie_name in /usr/home/michelle/public_html/gallery/include/functions.inc.php on line 29


Could it be a cookie setting error?

Dennis
Title: Re: Restore factory settings
Post by: Joachim Müller on September 28, 2005, 10:48:28 am
forget about the notices, the notices display should be turned off - this is in fact a developer option only. Not related to cookie stuff. We need the "hard" error.
Title: Re: Restore factory settings
Post by: bree on September 28, 2005, 11:08:05 am
Fatal error :
There was an error while processing a database query
Enable debug mode in coppermine's config table (set it from 0 to 1) to see the actual query that failed.

Where do I do that? I tried in coppermine within the config page to change it like Azy suggested earlier but none of the changes I make actually save. If I download the config.php can I find the coding in there?
Title: Re: Restore factory settings
Post by: Joachim Müller on September 28, 2005, 11:13:45 am
no, the configuration is not being stored in the file, but in your mySQL database. Downloading the file won't help. If you can't save the changes in coppermine's config, you'll have to directy access your database using a tool like phpMyAdmin or similar (e.g. cpanel). Using this app, you need to browse coppermine's config table (usually named "cpg135_config" or similar", find the entry "debug_mode" and change the value from "0" to "1". There's another switch for the notices display as well.
Title: Re: Restore factory settings
Post by: bree on September 28, 2005, 11:40:39 am
Okay I have cPanel and have a MySQL database but I can't see a phpMyAdmin or anything. The only options I can seem to find in the mySQL database is check, delete and repair. As I said I am new to this so any help is appreciated! Thanks for the help so far.
Title: Re: Restore factory settings
Post by: Tranz on September 28, 2005, 02:49:51 pm
At the bottom of the mysql page, do you not see a link to phpmyadmin? If you can't find it, you will need to ask your host.
Title: Re: Restore factory settings
Post by: bree on September 28, 2005, 03:05:52 pm
Found it! I can't believe I didn't see it there before. I have clicked into the cpg132_config table but can't seem to find the debug_mode entry.
Title: Re: Restore factory settings
Post by: Nibbler on September 28, 2005, 03:11:55 pm
Click browse. It may not be on first page of results, so keep looking.
Title: Re: Restore factory settings
Post by: bree on September 28, 2005, 03:21:30 pm
I've searched for debug_mode and it doesn't seem to be there. Maybe I am looking in the wrong place? I've made some screencaps of where I am looking, that might explain it a little better:

http://www.michelletrachtenberg.net/copperminecap.jpg
http://www.michelletrachtenberg.net/copperminecap2.jpg

Sorry for the trouble everyone, I have no idea myself how to fix the problem. Thanks for everyones help so far.
Title: Re: Restore factory settings
Post by: Nibbler on September 28, 2005, 03:43:01 pm
Click on SQL, paste in the following statements, and submit the form. That should allow config settings to be saved by the config screen.

Code: [Select]
INSERT INTO cpg132_config VALUES ('albums_per_page', '12');
INSERT INTO cpg132_config VALUES ('album_list_cols', '2');
INSERT INTO cpg132_config VALUES ('display_pic_info', '0');
INSERT INTO cpg132_config VALUES ('alb_list_thumb_size', '50');
INSERT INTO cpg132_config VALUES ('allowed_mov_types', 'ALL');
INSERT INTO cpg132_config VALUES ('allowed_doc_types', 'ALL');
INSERT INTO cpg132_config VALUES ('allowed_snd_types', 'ALL');
INSERT INTO cpg132_config VALUES ('allowed_img_types', 'ALL');
INSERT INTO cpg132_config VALUES ('allow_private_albums', '1');
INSERT INTO cpg132_config VALUES ('allow_user_registration', '0');
INSERT INTO cpg132_config VALUES ('allow_duplicate_emails_addr', '0');
INSERT INTO cpg132_config VALUES ('caption_in_thumbview', '1');
INSERT INTO cpg132_config VALUES ('views_in_thumbview', '1');
INSERT INTO cpg132_config VALUES ('charset', 'language file');
INSERT INTO cpg132_config VALUES ('cookie_name', 'cpg133');
INSERT INTO cpg132_config VALUES ('cookie_path', '/');
INSERT INTO cpg132_config VALUES ('debug_mode', '0');
INSERT INTO cpg132_config VALUES ('debug_notice', '0');
INSERT INTO cpg132_config VALUES ('default_dir_mode', '0755');
INSERT INTO cpg132_config VALUES ('default_file_mode', '0644');
INSERT INTO cpg132_config VALUES ('default_sort_order', 'na');
INSERT INTO cpg132_config VALUES ('ecards_more_pic_target', 'http://coppermine.sourceforge.net/');
INSERT INTO cpg132_config VALUES ('enable_smilies', '1');
INSERT INTO cpg132_config VALUES ('filter_bad_words', '0');
INSERT INTO cpg132_config VALUES ('forbiden_fname_char', '$/\\\\:*?"\'<>|`');
INSERT INTO cpg132_config VALUES ('fullpath', 'albums/');
INSERT INTO cpg132_config VALUES ('gallery_admin_email', 'you@somewhere.com');
INSERT INTO cpg132_config VALUES ('gallery_description', 'Your online photo album');
INSERT INTO cpg132_config VALUES ('gallery_name', 'Coppermine Photo Gallery');
INSERT INTO cpg132_config VALUES ('im_options', '-antialias');
INSERT INTO cpg132_config VALUES ('impath', '');
INSERT INTO cpg132_config VALUES ('jpeg_qual', '80');
INSERT INTO cpg132_config VALUES ('keep_votes_time', '30');
INSERT INTO cpg132_config VALUES ('lang', 'english');
INSERT INTO cpg132_config VALUES ('main_page_layout', 'breadcrumb/catlist/alblist/random,2/lastup,2');
INSERT INTO cpg132_config VALUES ('main_table_width', '100%');
INSERT INTO cpg132_config VALUES ('make_intermediate', '1');
INSERT INTO cpg132_config VALUES ('max_com_lines', '10');
INSERT INTO cpg132_config VALUES ('max_com_size', '512');
INSERT INTO cpg132_config VALUES ('max_com_wlength', '38');
INSERT INTO cpg132_config VALUES ('max_img_desc_length', '512');
INSERT INTO cpg132_config VALUES ('max_tabs', '12');
INSERT INTO cpg132_config VALUES ('max_upl_size', '1024');
INSERT INTO cpg132_config VALUES ('max_upl_width_height', '2048');
INSERT INTO cpg132_config VALUES ('min_votes_for_rating', '1');
INSERT INTO cpg132_config VALUES ('normal_pfx', 'normal_');
INSERT INTO cpg132_config VALUES ('offline', '0');
INSERT INTO cpg132_config VALUES ('picture_table_width', '600');
INSERT INTO cpg132_config VALUES ('picture_width', '400');
INSERT INTO cpg132_config VALUES ('randpos_interval', '1063623637');
INSERT INTO cpg132_config VALUES ('read_exif_data', '0');
INSERT INTO cpg132_config VALUES ('reg_requires_valid_email', '1');
INSERT INTO cpg132_config VALUES ('subcat_level', '2');
INSERT INTO cpg132_config VALUES ('theme', 'classic');
INSERT INTO cpg132_config VALUES ('thumbcols', '4');
INSERT INTO cpg132_config VALUES ('thumbrows', '3');
INSERT INTO cpg132_config VALUES ('thumb_method', 'im');
INSERT INTO cpg132_config VALUES ('thumb_pfx', 'thumb_');
INSERT INTO cpg132_config VALUES ('thumb_width', '100');
INSERT INTO cpg132_config VALUES ('userpics', 'userpics/');
INSERT INTO cpg132_config VALUES ('user_field1_name', '');
INSERT INTO cpg132_config VALUES ('user_field2_name', '');
INSERT INTO cpg132_config VALUES ('user_field3_name', '');
INSERT INTO cpg132_config VALUES ('user_field4_name', '');
INSERT INTO cpg132_config VALUES ('display_comment_count', '0');
INSERT INTO cpg132_config VALUES ('show_private', '0');
INSERT INTO cpg132_config VALUES ('first_level', '1');
INSERT INTO cpg132_config VALUES ('display_film_strip', '1');
INSERT INTO cpg132_config VALUES ('max_film_strip_items', '5');
INSERT INTO cpg132_config VALUES ('thumb_use', 'any');
INSERT INTO cpg132_config VALUES ('comment_email_notification', '0');
INSERT INTO cpg132_config VALUES ('read_iptc_data', '0');
INSERT INTO cpg132_config VALUES ('reg_notify_admin_email', '0');
INSERT INTO cpg132_config VALUES ('disable_comment_flood_protect', '0');
INSERT INTO cpg132_config VALUES ('upl_notify_admin_email', '0');
INSERT INTO cpg132_config VALUES ('display_uploader', '0');
INSERT INTO cpg132_config VALUES ('language_list', '0');
INSERT INTO cpg132_config VALUES ('language_flags', '0');
INSERT INTO cpg132_config VALUES ('theme_list', '0');
INSERT INTO cpg132_config VALUES ('language_reset', '1');
INSERT INTO cpg132_config VALUES ('theme_reset', '1');
INSERT INTO cpg132_config VALUES ('allow_memberlist', '0');
INSERT INTO cpg132_config VALUES ('display_faq', '0');
INSERT INTO cpg132_config VALUES ('show_bbcode_help', '1');
INSERT INTO cpg132_config VALUES ('log_ecards', '0');
INSERT INTO cpg132_config VALUES ('email_comment_notification', '0');
INSERT INTO cpg132_config VALUES ('enable_zipdownload', '1');
INSERT INTO cpg132_config VALUES ('slideshow_interval', '5000');
Title: Re: Restore factory settings
Post by: bree on September 28, 2005, 03:50:55 pm
The problem with the config page is now fixed and I have put in all the values I had before and now none of the thumbs or images show up. The is just little boxes for the thumbnails and frames for the images. Any idea of what could have caused that and how to fix it?

I searched the boards and found this topic:

http://forum.coppermine-gallery.net/index.php?topic=14025.0

It is almost exactly the same as my problem the only difference is that none of the thumbnails or images load in Coppermine. If I type in the full links in my browser they show up. The other topic didn't have a solution but I thought it might give some help to what the problem is.
Title: Re: Restore factory settings
Post by: Tranz on September 28, 2005, 04:36:20 pm
Did you change the ecard URL to match your gallery's location?
Title: Re: Restore factory settings
Post by: bree on September 28, 2005, 04:42:14 pm
Do you mean the option 'Target address for the 'See more pictures' link in e-cards', then yes I changed it, it is the galleries location.
Title: Re: Restore factory settings
Post by: Tranz on September 28, 2005, 04:47:55 pm
hmmm... looking at the code, the img src isn't there. Since you have the 1.3.2 version of Coppermine, please upgrade to the latest, 1.3.5. Let's see if that fixes any issue with the previous files and address security flaws that have been discovered.
Title: Re: Restore factory settings
Post by: bree on September 29, 2005, 06:46:10 am
I've downloaded the 1.3.5 files and I've backed up the database. The size is only 1.22MB, is that right? It seems a little small. The zip file has only one file in it michelle_gallery.sql. I just want to make sure it is right before I start to upgrade. Should upgrading to the latest version fix the problem with the thumbnails and pictures?
Title: Re: Restore factory settings
Post by: Tranz on September 29, 2005, 07:28:11 am
What do you mean about the zip file being named michelle_gallery.sql? Is that the backup of the database? The database doesn't have to be large since it is containing text data and not the photos themselves. The file is a text file so you can open it in a text editor to survey the info in it.

I don't know if this will fix it (someone else might have the answer). However, this would rule out issues with the previous files. It's like crime solving... you can't always pinpoint the criminal, but sometimes must do a process of elimination to settle upon a suspect.
Title: Re: Restore factory settings
Post by: bree on September 29, 2005, 07:36:50 am
I mean that the zip file has only one file in it called michelle_gallery.sql. The backup is michelle_gallery.zip. I should've explained that better. The text file looks like it has everything in it. I will update the database tonight and post back if that fixes the problem or if I have any troubles. Again thank-you so much for the help you've given me, I am so appreciative!
Title: Re: Restore factory settings
Post by: bree on September 29, 2005, 04:09:16 pm
I upgraded and the gallery works fine now. Thanks so much for all of your help everyone!
Title: Re: Restore factory settings
Post by: timberguy on August 20, 2006, 10:04:50 pm
I also made this mistake and need some help. I am using a simplemachines forum and the bridge between that and Coppermine Photo Gallery 1.3.2 is still functional, however I am getting these errors and no gallerys or photos show and when I try to reset using config I get no change.

Notice: Undefined index: cookie_name in /home/www/mysite*edited/gallery/include/functions.inc.php on line 29

Notice: Undefined index: debug_notice in /home/www/mysite*edited/gallery/include/init.inc.php on line 315

I do have a back up of the whole database, but my coppermine tables are in the same database as the forums, although I think that is normal.  I do have phpMyAdmin installed on my server., but do not know how to replace tables.

Can anyone tell me firstly, what all is changed when you restore factory defaults, and secondly give me instruction on how to replace the current information in my tables with my back up information?  I am afraid to upgrade either SMF or Coppermine for fear of breaking the bridge to my forum because I had a heck of a time getting it right to begin with. The forum is pretty big with almost 300,000 posts and upgradeing it would be a big challenge.

Thank you all for any help you can provide. I posted this on this thread because it was so similar to my problem.