forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 upgrading => Topic started by: Toblet on August 20, 2011, 08:40:32 pm

Title: Fatal Error On Upgrade..
Post by: Toblet on August 20, 2011, 08:40:32 pm
Hi guys,

I upgraded to the latest version of CPG and got this error,

Fatal Error

While executing query 'SELECT name, value FROM cpg15x_config' in include/init.inc.php on line 181

mySQL error: Table 'tbrack_nsjedi33.cpg15x_config' doesn't exist

Can someone please tell me how to fix this,

Thank you,

Toby =)
Title: Re: Fatal Error On Upgrade..
Post by: Toblet on August 20, 2011, 08:51:52 pm
I didn't the right config in the config file,

Now I get this:

Fatal error: require_once() [function.require]: Failed opening required 'bridge/e107.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/tbrack/public_html/e107_plugins/cpg15x/include/init.inc.php on line 243

Any idea on how to fix it,

Thanks,

Toby =)
Title: Re: Fatal Error On Upgrade..
Post by: Toblet on August 20, 2011, 08:57:16 pm
Got the next part fixed, now I get:

"Please, enter relative path to e107"

Then a text box below and file path in it,

Does coppermine think im not installing it in e107 because I am..
Title: Upgrade Fatal Error..
Post by: Toblet on August 21, 2011, 11:07:22 am
Hi guys,

I get this fatal error after I upgraded:

Fatal Error:

While executing query 'SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MIN(can_rate_pictures) as can_rate_pictures, MIN(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MIN(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MIN(can_post_comments) as can_post_comments, MIN(can_upload_pictures) as can_upload_pictures, MIN(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MAX(pub_upl_need_approval) as pub_upl_need_approval, MAX( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg1410_usergroups WHERE group_id in (103)' in bridge/e107.inc.php on line 471

mySQL error: Unknown column 'upload_form_config' in 'field list'

Does this have todo with the bridge, after I posted it here I could see at the end it says line 471 in my bridge file??
Title: Re: Upgrade Fatal Error..
Post by: Toblet on August 21, 2011, 05:01:56 pm
If I disable the bridge in mysql I get this:

While executing query "SELECT aid FROM cpg1410_albums WHERE visibility != '0' AND visibility !='10000' AND visibility NOT IN (3)" on 0

mySQL error: Table 'tbrack_nsjedi33.cpg1410_albums' doesn't exist

USER:
------------------
Array
(
    [ID] => 863160ae149a0a6594ad5dd95128c896
    [am] => 1
    [lang] => english_gb
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 0
    [user_name] => Guest
    [groups] => Array
        (
           
        )

    [group_quota] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 0
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 0
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 1
    [upload_form_config] => 3
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [custom_user_upload] => 0
    [can_see_all_albums] => 0
    [disk_max] => 0
    [disk_min] => 0
    [ufc_max] => 3
    [ufc_min] => 3
    [has_admin_access] => 0
    [group_name] => Guests
    [group_id] => 3
)

==========================
Queries:
------------------
Array
(
   
Title: Re: Fatal Error On Upgrade..
Post by: Αndré on August 22, 2011, 04:32:22 pm
Please post a link to your gallery. I merged your two threads as you haven't resolved one of them. What's the current issue? Please explain exactly what happens.
Title: Re: Fatal Error On Upgrade..
Post by: Toblet on September 14, 2011, 04:07:54 pm
Okay, cheers,

Gallery is: http://nsjedi.com/e107_plugins/gallery/

Please give me any advice so I can fix it,

Thank you,

Toby =)
Title: Re: Fatal Error On Upgrade..
Post by: Αndré on September 14, 2011, 04:17:24 pm
Quote
While executing query "SELECT aid FROM cpg1410_albums WHERE visibility != '0' AND visibility !='10000' AND visibility NOT IN (3)" on 0

mySQL error: Table 'tbrack_nsjedi33.cpg1410_albums' doesn't exist

Please check if that table exists in your database. Verify that the database name and the table prefix are the correct ones. If it doesn't exist, restore it from a backup and run update.php again.
Title: Re: Fatal Error On Upgrade..
Post by: Toblet on September 14, 2011, 06:32:01 pm
Hi Andre,

I looked in config.inc.php, I hope thats the file for connections to database, all was correct,

I tried to get backup from my hard drive, non had the albums table - also tried from hosting company, no go,

Not sure why it happened, I moved the site to a new host bout 6 months ago, I didn't fix the problem then, and then I tried upgrading without fixing the problem, I thought that upgrading would be a fix for it, so not sure how fixable this prob is...
Title: Re: Fatal Error On Upgrade..
Post by: Αndré on September 14, 2011, 06:39:48 pm
If you don't have a backup of that table you can create it with the following query. But all of your albums are lost and it might be a time-consuming task to re-create your gallery structure.

Code: [Select]
CREATE TABLE cpg1410_albums (
  aid int(11) NOT NULL auto_increment,
  title varchar(255) NOT NULL default '',
  description text NOT NULL,
  visibility int(11) NOT NULL default '0',
  uploads enum('YES','NO') NOT NULL default 'NO',
  comments enum('YES','NO') NOT NULL default 'YES',
  votes enum('YES','NO') NOT NULL default 'YES',
  pos int(11) NOT NULL default '0',
  category int(11) NOT NULL default '0',
  owner int(11) NOT NULL DEFAULT '1',
  thumb int(11) NOT NULL default '0',
  keyword VARCHAR( 50 ),
  alb_password VARCHAR( 32 ),
  alb_password_hint TEXT,
  moderator_group INT NOT NULL default 0,
  alb_hits INT( 10 ) NOT NULL default 0,
  PRIMARY KEY  (aid),
  KEY alb_category (category),
  KEY `moderator_group` (`moderator_group`),
  KEY `visibility` (`visibility`)
) COMMENT='Used to store albums';
Title: Re: Fatal Error On Upgrade..
Post by: Toblet on September 14, 2011, 06:55:34 pm
Yeah, I thought thats what I would have todo, I will have to reconstruct everything piece by piece right?,

I added that table but now for some odd reason it seems to be redirecting to my old subdomain, I had alook but can't find where its coming from, in database or a file
Title: Re: Fatal Error On Upgrade..
Post by: Toblet on September 14, 2011, 06:59:57 pm
I found in the bridge in the database it had the old url, I changed it to the current one but now it redirects to the home page
Title: Re: Fatal Error On Upgrade..
Post by: Αndré on September 14, 2011, 07:00:28 pm
I will have to reconstruct everything piece by piece right?,
If you lost your complete database (= no tables exist at all) you don't need to restore anything manually, but should install Coppermine from scratch.
Title: Re: Fatal Error On Upgrade..
Post by: Toblet on September 14, 2011, 07:03:59 pm
Hey Andre,

All the tables are there except the album one, not sure how that happened, I just get an error now, I think I will just install a new copy and then reconstruct, is there a guide for reconstructing a gallery from scratch...
Title: Re: Fatal Error On Upgrade..
Post by: Joe Carver on September 15, 2011, 12:06:12 am
Ask your hosting company if they have a backup. A copy even a few months old is better than none (IMHO).
Title: Re: Fatal Error On Upgrade..
Post by: Toblet on September 15, 2011, 12:38:14 am
Hey Joe,

I asked them already and they said their backups are only one week old and they don't keep multiples, they save the new over the old, so 1 week is as far back as I can go
Title: Re: Fatal Error On Upgrade..
Post by: Joe Carver on September 15, 2011, 01:29:09 am
If that copy is also damaged, then you should follow Αndré's advice.

is there a guide for reconstructing a gallery from scratch...

The document package that is within the Download can guide you. Or click the Documentation link above. The instructions are detailed.
Title: Re: Fatal Error On Upgrade..
Post by: Toblet on September 15, 2011, 11:19:59 am
Hey Joe,

I didn't loose my complete database though, I just lost the albums table for some strange reason, can you help with this please?,

Toby =)
Title: Re: Fatal Error On Upgrade..
Post by: Αndré on September 15, 2011, 11:36:51 am
1. Install a fresh copy of cpg1.5.16 to a new directory
2. If it works, adjust the config.inc.php file to use your already existing database
3. Now you should see your old gallery (at least the categories), but of course no albums

Confirm if that works and we can proceed to the next steps.
Title: Re: Fatal Error On Upgrade..
Post by: Toblet on September 15, 2011, 01:33:37 pm
I installed 1.5.16 and changed the config details, now I get a bridge error

http://nsjedi.com/e107_plugins/cpg15x/index.php
Title: Re: Fatal Error On Upgrade..
Post by: Toblet on September 15, 2011, 01:51:46 pm
I got the bridge file from the old version and now I get the:

"Please, enter relative path to e107" error, I looked it up and I think its something todo with redirecting
Title: Re: Fatal Error On Upgrade..
Post by: Αndré on September 15, 2011, 02:01:22 pm
http://documentation.coppermine-gallery.net/en/bridging.htm#bridge_manager_recover_start
Title: Re: Fatal Error On Upgrade..
Post by: Toblet on September 15, 2011, 02:15:27 pm
Okay, I turned bridging off, in the cpg15x gallery I get a new error: http://nsjedi.com/e107_plugins/cpg15x ,

But in the cpg1410 gallery I can search images but when I click on them I get an "album doesn't exist error"
Title: Re: Fatal Error On Upgrade..
Post by: Toblet on September 15, 2011, 02:23:38 pm
It semi works now in cpg1410 but I still get errors and can't click on half the buttons, I tried adding an album and it worked: http://nsjedi.com/e107_plugins/gallery/
Title: Re: Fatal Error On Upgrade..
Post by: Αndré on September 15, 2011, 02:47:17 pm
Please stop to use your old gallery. You have to run update.php to make your database cpg1.5.x compatible.
Title: Re: Fatal Error On Upgrade..
Post by: Toblet on September 15, 2011, 03:02:47 pm
Yes, that works, I now have the categories in the new version =) Awesome!
Title: Re: Fatal Error On Upgrade..
Post by: Αndré on September 15, 2011, 03:15:23 pm
Now begins the tricky part. You'll have to re-create all albums in the appropriate categories. Then, you have to manipulate the album ids with a tool like PHPMyAdmin, so they match the corresponding albums ids in the pictures table (that way you re-assign the pictures to the albums).
Title: Re: Fatal Error On Upgrade..
Post by: Toblet on September 15, 2011, 03:19:06 pm
Okay, im pretty sure I understand the manipulate part, I will have to go into mysql and change the table values, is there an example somewhere - like a walk through that I could follow?
Title: Re: Fatal Error On Upgrade..
Post by: Αndré on September 15, 2011, 03:34:06 pm
No. Just create the albums and they'll get unique IDs. Then look at the pictures table in your database and you'll find the old albums IDs. Now you can adjust the IDs in either the pictures table or the albums table, but it's easier to change them in the albums table.

There's another (similar, but GUI) solution. You could create one 'temp' album and assign all pictures to that album. Then, you can move them within Coppermine.

Title: Re: Fatal Error On Upgrade..
Post by: Toblet on September 15, 2011, 03:48:32 pm
Very nice =D Now I can just upload the userpics into the albums folder?
Title: Re: Fatal Error On Upgrade..
Post by: Toblet on September 15, 2011, 03:56:29 pm
Yeah, that seemed to work, should be good now, anything else I have todo?
Title: Re: Fatal Error On Upgrade..
Post by: Αndré on September 15, 2011, 04:15:20 pm
I don't know which approach you used and what else you did, so I cannot tell if you have anything else to do.
Title: Re: Fatal Error On Upgrade..
Post by: Toblet on September 15, 2011, 04:24:08 pm
Everything seems to be good now, I will let you know if anything else needs fixing, thanks Andre for all the help =)
Title: Re: Fatal Error On Upgrade..
Post by: Αndré on September 15, 2011, 04:36:17 pm
tag your answer as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.
Title: Re: Fatal Error On Upgrade..
Post by: Toblet on September 15, 2011, 08:40:35 pm
Hey Andre, how do I visually integrate coppermine, I forgotten can you point me to a guide or give me a brief please?,

Toby =)
Title: Re: Fatal Error On Upgrade..
Post by: Αndré on September 16, 2011, 11:33:49 am
10. One question per thread
We have a strict "One question/issue per thread rule", which helps both supporters/moderators to keep track of open/closed issues as well as users who search the board or browse it, looking for answers to their question.
Title: Re: Fatal Error On Upgrade..
Post by: Toblet on September 16, 2011, 04:28:02 pm
Oh yeah, forget about that, sorry dood =)