Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Upgraded from 1.4.19 to .25 = Fatal error  (Read 5659 times)

0 Members and 1 Guest are viewing this topic.

Dolkur

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Upgraded from 1.4.19 to .25 = Fatal error
« on: July 20, 2009, 12:24:42 pm »

My site works fine with all files updated, except "include/init.inc.php". If I'm using version 1.4.19 of init.inc.php it works fine.
With version 1.4.25 of init.inc.php, I get the code:
Code: [Select]
Fatal error :<br /><br />.<br /><br/>
                    <form name="mysql"><textarea rows="8" cols="60">While executing query &quot;SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM  WHERE group_id in (3)&quot; on 0
 
mySQL error:
</textarea></form>

I followed the update procedure. I have run update.php.

http://hg.faroenature.net/gallery/
Code: [Select]
MySQL: 5.1.30
PHP: 5.2.5

Any suggestions as to where my problem lies?
Logged

Gene-2008

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 188
Re: Upgraded from 1.4.19 to .25 = Fatal error
« Reply #1 on: July 20, 2009, 05:57:03 pm »

1st I'm no expert...just a fellow traveler.

2nd Your error is occurring in the udb_base.inc.php   looks like from the code that if the group_id = 3 does not exist than you get a critical error....like you are getting.  You might 1) check your data base and make sure you have a group_id of 3 which is "guest"... 2) You might check for differences between the two versions of init.inc.php...

I know this is not the solution you might want but hope it helps.
Gene


Code: [Select]
    // Perform database queries to calculate user's privileges based on group membership
    function get_user_data($pri_group, $groups, $default_group_id = 3)
    {

//Parameters :
//   $pri_group (scalar) :  Group ID number of the user's 'main' group.
// This is the group that will be the user's profile display.
// ($USER_DATA['group_id'])
//
//   $groups (array) :      List of group ids of all the groups that the user is a member of.
// IF this list does not include the $pri_group, it will be added.
//
//  $default_group_id (scalar) :  The group used as a fall-back if no valid group ids are specified.
//                                If this group also does not exist then CPG will abort with a critical error.
//
// Returns an array containing most of the data to put into in $USER_DATA.

            global $CONFIG;

            foreach ($groups as $key => $val)
                    if (!is_numeric($val))
                            unset ($groups[$key]);
            if (!in_array($pri_group, $groups)) array_push($groups, $pri_group);

            $result = cpg_db_query("SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, " .
                            "MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, " .
                            "MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, " .
                            "MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, " .
                            "MAX(num_URI_upload) as num_URI_upload, " .
                            "MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, " .
                            "MAX(can_create_albums) as can_create_albums, " .
                            "MAX(has_admin_access) as has_admin_access, " .
                            "MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval ".
                            "FROM {$CONFIG['TABLE_USERGROUPS']} WHERE group_id in (" .  implode(",", $groups). ")");
Logged

Dolkur

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Upgraded from 1.4.19 to .25 = Fatal error
« Reply #2 on: July 20, 2009, 06:24:54 pm »

Hi Gene

I did notice that the query related to the usergroups and checked the table. But it looks fine to me. And I've checked the difference between the two versions of init.inc.php. There are of course differences, but none that I can see which would give that error.

I hadn't noticed that the error occurs in udb_base.inc.php. I'll look into that.
Logged

Dolkur

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Upgraded from 1.4.19 to .25 = Fatal error
« Reply #3 on: July 20, 2009, 07:44:45 pm »

Actually.

My coppermine is bridged, and the cpg_users table is totally empty!
Could this be related to that?
Logged

Nibbler

  • Guest
Re: Upgraded from 1.4.19 to .25 = Fatal error
« Reply #4 on: July 20, 2009, 10:29:35 pm »

If it's empty it's because you emptied it. I don't think it's related though. Make sure you uploaded all the files and that none is corrupted.
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.