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: There was an error while processing a database query.  (Read 3499 times)

0 Members and 1 Guest are viewing this topic.

Drea

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 35
There was an error while processing a database query.
« on: August 27, 2009, 11:24:50 pm »

When I click Users in my Gallery this is the error I get so I can't view my users or edit them and I would like too here is the debug below I hope someone can help me with a solution it is much appreciated, thanks.

Quote
USER:
------------------
Array
(
    [ID] => 56e5d682b3416931c1d5b9233b4b3232
    [am] => 1
    [lang] => english
    [liv] => Array
        (
           
  • => 12356
  • [1] => 24504
                [2] => 15502
                [3] => 37939
                [4] => 43371
            )

    )

    ==========================
    USER DATA:
    ------------------
    Array
    (
       
[user_id] => 1
    [user_name] => admin
    [groups] => Array
        (
           
  • => 1

        )

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

==========================
Queries:
------------------
Array
(
   
  • => SELECT extension, mime, content, player FROM cpg_filetypes; (0s)
  • [1] => select * from cpg_plugins order by priority asc; (0s)
        [2] => delete from `ksphotos`.cpg_sessions where time<1251404488 and remember=0; (0.001s)
        [3] => delete from `ksphotos`.cpg_sessions where time<1250198488; (0.001s)
        [4] => select user_id from `ksphotos`.cpg_sessions where session_id = '4e3c3556ff86f3b6b207e336b2482a5d' (0s)
        [5] => select user_id as id, user_password as password from `ksphotos`.cpg_users where user_id=1 (0s)
        [6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.avatar_url AS avatar_url, u.enable_admin_email AS notify, u.auto_subscribe_post AS auto_subscribe_post, u.auto_subscribe_comment AS auto_subscribe_comment, u.user_group+100 AS group_id FROM `ksphotos`.cpg_users AS u INNER JOIN `ksphotos`.cpg_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0.001s)
        [7] => SELECT user_group_list FROM `ksphotos`.cpg_users AS u WHERE user_id='1' and user_group_list <> ''; (0.001s)
        [8] => 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 cpg_usergroups WHERE group_id in (1) (0.001s)
        [9] => SELECT group_name FROM  cpg_usergroups WHERE group_id= 1 (0.201s)
        [10] => update `ksphotos`.cpg_sessions set time='1251408089' where session_id = '4e3c3556ff86f3b6b207e336b2482a5d' (0s)
        [11] => SELECT user_favpics FROM cpg_favpics WHERE user_id = 1 (0s)
        [12] => DELETE FROM cpg_mod_online WHERE last_action < NOW() - INTERVAL 10 MINUTE (0s)
        [13] => REPLACE INTO cpg_mod_online (user_id, user_name, user_ip, last_action) VALUES ('1', 'admin', '99.7.117.13', NOW()) (0s)
        [14] => DELETE FROM cpg_banned WHERE expiry < '2009-08-27 17:21:29' (0s)
        [15] => SELECT * FROM cpg_banned WHERE (ip_addr='99.7.117.13' OR ip_addr='99.7.117.13' OR user_id=1) AND brute_force=0 (0s)
        [16] => DELETE FROM cpg_users WHERE user_name = '' LIMIT 1 (0s)
        [17] => SELECT COUNT(*) FROM cpg_pictures WHERE approved = 'NO' (0.008s)
        [18] => SELECT count(*) FROM `ksphotos`.cpg_users WHERE 1 (0s)
        [19] => SELECT user_id as user_id, user_name as user_name, user_email as user_email, UNIX_TIMESTAMP(user_regdate) as user_regdate, UNIX_TIMESTAMP(user_lastvisit) as user_lastvisit, user_active as user_active, COUNT(pid) as pic_count, ROUND(SUM(total_filesize)/1024) as disk_usage, group_name, group_quota FROM `ksphotos`.cpg_users AS u INNER JOIN cpg_usergroups AS g ON u.user_group = g.group_id LEFT JOIN cpg_pictures AS p ON p.owner_id = u.user_id GROUP BY user_id ORDER BY user_regdate DESC LIMIT 0, 25; (0s)
    )

    ==========================
    GET :
    ------------------
    Array
    (
    )

    ==========================
    POST :
    ------------------
    Array
    (
    )

    ==========================
    VERSION INFO :
    ------------------
    PHP version: 5.2.2 - OK
    ------------------
    mySQL version: 5.0.83-log
    ------------------
    Coppermine version: 1.4.24(stable)
    ==========================
    Module: GD
    ------------------
    GD Version: bundled (2.0.34 compatible)
    FreeType Support: 1
    FreeType Linkage: with freetype
    T1Lib Support:
    GIF Read Support: 1
    GIF Create Support: 1
    JPG Support: 1
    PNG Support: 1
    WBMP Support: 1
    XPM Support:
    XBM Support: 1
    JIS-mapped Japanese Font Support:

    ==========================
    Module: mysql
    ------------------
    MySQL Supportenabled
    Active Persistent Links 0
    Active Links 1
    Client API version 4.1.11
    MYSQL_MODULE_TYPE external
    MYSQL_SOCKET /var/run/mysqld/mysqld.sock
    MYSQL_INCLUDE -I/usr/include/mysql
    MYSQL_LIBS -L/usr/lib -lmysqlclient 
    ==========================
    Module: zlib
    ------------------
    ZLib Support enabled
    Stream Wrapper support compress.zlib://
    Stream Filter support zlib.inflate, zlib.deflate
    Compiled Version 1.2.2
    Linked Version 1.2.3
    ==========================
    Server restrictions (safe mode)?
    ------------------
    Directive | Local Value | Master Value
    safe_mode | Off | Off
    safe_mode_exec_dir | no value | no value
    safe_mode_gid | Off | Off
    safe_mode_include_dir | no value | no value
    safe_mode_exec_dir | no value | no value
    sql.safe_mode | Off | Off
    disable_functions | no value | no value
    file_uploads | On | On
    include_path | .:/usr/local/lib/php-5.2.2/lib/php | .:/usr/local/lib/php-5.2.2/lib/php
    open_basedir | no value | no value
    ==========================
    email
    ------------------
    Directive | Local Value | Master Value
    sendmail_from | no value | no value
    sendmail_path | /usr/sbin/sendmail -t -i  | /usr/sbin/sendmail -t -i
    SMTP | localhost | localhost
    smtp_port | 25 | 25
    ==========================
    Size and Time
    ------------------
    Directive | Local Value | Master Value
    max_execution_time | 300 | 300
    max_input_time | 60 | 60
    upload_max_filesize | 2M | 2M
    post_max_size | 8M | 8M
    ==========================
    Page generated in 0.293 seconds - 20 queries in 0.214 seconds - Album set : ; Meta set: ;
Logged

Nibbler

  • Guest
Re: There was an error while processing a database query.
« Reply #1 on: August 27, 2009, 11:28:15 pm »

Post the actual error message.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: There was an error while processing a database query.
« Reply #2 on: August 27, 2009, 11:28:54 pm »

http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616
Post a link as suggested. Don't post debug_output. Only post the error message, i.e. the query that fails.
Logged

Drea

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 35
Re: There was an error while processing a database query.
« Reply #3 on: August 27, 2009, 11:51:08 pm »

While executing query "SELECT user_id as user_id, user_name as user_name, user_email as user_email, UNIX_TIMESTAMP(user_regdate) as user_regdate, UNIX_TIMESTAMP(user_lastvisit) as user_lastvisit, user_active as user_active, COUNT(pid) as pic_count, ROUND(SUM(total_filesize)/1024) as disk_usage, group_name, group_quota FROM `ksphotos`.cpg_users AS u INNER JOIN cpg_usergroups AS g ON u.user_group = g.group_id LEFT JOIN cpg_pictures AS p ON p.owner_id = u.user_id GROUP BY user_id ORDER BY user_regdate DESC LIMIT 0, 25;" on Resource id #5

mySQL error: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay


File: /hermes/web10/b2804/pow.unusuallove/htdocs/glamourgirl/photos/include/functions.inc.php - Line: 248

http://glamourgirlkstorms.com/photos/
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: There was an error while processing a database query.
« Reply #4 on: August 28, 2009, 12:00:41 am »

I'm not a db specialist, but to me it looks like you're running into mysql limitations imposed by your webhost.
http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_max_join_size might help, i.e. running SET SQL_BIG_SELECTS=1
 before the query that causes the error.
Someone more knowledgable might know better though.
Logged

Drea

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 35
Re: There was an error while processing a database query.
« Reply #6 on: August 28, 2009, 12:07:57 am »

Thanks so much the 2nd link helped the most :) its now fixed , I can't believe I just sat on this for months letting it be unfixed thanks again!!!  ;D
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.