Critical error within include/functions.inc.php Critical error within include/functions.inc.php
 

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

Main Menu

Critical error within include/functions.inc.php

Started by Cubey, April 19, 2007, 12:05:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Cubey

I'm bridging Coppermine 1.4.10 to SMF 1.1.2 in case this might end up being a bridge issue though I'm not certain that it is, hence posting this on the Misc board just in case it's not. Anyhoo...

I suddenly began getting the following error out of the clear blue sky after everything seemed to be working over a 24 period. I guess once users besides myself starting using it, it caused the problem:


QuoteCritical error / There was an error while processing a database query.

While executing query "SELECT owner_id as user_id,COUNT(DISTINCT a.aid) as alb_count,COUNT(DISTINCT pid) as pic_count,MAX(pid) as thumb_pid, MAX(galleryicon) as gallery_pid FROM cpg1410_albums AS a INNER JOIN cpg1410_pictures AS p ON p.aid = a.aid WHERE ((isnull(approved) or approved='YES') AND category > 10000)  GROUP BY user_id ORDER BY category LIMIT 0, 12 " on 0

mySQL error:

File: /hsphere/local/home/cubey2600/shasta.illiop.com/gallery/include/functions.inc.php - Line: 249

------
Here is the debug info:


QuoteUSER:
------------------
Array
(
    [ID] => 9bc4fb3753a302dea6b40d4a7c6a77af
    [am] => 1
    [lang] => english
    [liv] => Array
        (
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => Cubey
    [groups] => Array
        (
           
  • => 101
                [1] => 104
            )

        [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] => Administrator
        [upload_form_config] => 3
        [group_quota] => 0
        [can_see_all_albums] => 1
        [group_id] => 101
    )

    ==========================
    Queries:
    ------------------
    Array
    (
       
  • => SELECT extension, mime, content, player FROM cpg1410_filetypes; (0.001s)
        [1] => select * from cpg1410_plugins order by priority asc; (0s)
        [2] => SELECT * FROM cpg1410_bridge (0s)
        [3] => 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 cpg1410_usergroups WHERE group_id in (101,104) (0s)
        [4] => SELECT group_name FROM  cpg1410_usergroups WHERE group_id= 101 (0s)
        [5] => SELECT user_favpics FROM cpg1410_favpics WHERE user_id = 1 (0.001s)
        [6] => DELETE FROM cpg1410_banned WHERE expiry < '2007-04-18 21:56:56' (0s)
        [7] => SELECT * FROM cpg1410_banned WHERE (ip_addr='72.24.217.131' OR ip_addr='72.24.217.131' OR user_id=1) AND brute_force=0 (0.001s)
        [8] => SELECT aid FROM cpg1410_albums as a WHERE category>=10000 (0.006s)
        [9] => SELECT cid FROM cpg1410_categories WHERE parent = '1' (0.001s)
        [10] => SELECT name, parent FROM cpg1410_categories WHERE cid = '1' (0s)
        [11] => SELECT cid, name, description, thumb FROM cpg1410_categories WHERE parent = '1'  ORDER BY name (0s)
        [12] => SELECT aid FROM cpg1410_albums as a WHERE category >= 10000 (0.001s)
        [13] => SELECT COUNT(*) FROM cpg1410_pictures WHERE approved = 'NO' (0s)
        [14] => select null from cpg1410_albums as p  INNER JOIN cpg1410_pictures AS pics ON pics.aid = p.aid where ( category>10000 ) group by category; (0.001s)
        [15] => SELECT category - 10000 as user_id FROM cpg1410_albums AS a INNER JOIN cpg1410_pictures AS p ON p.aid = a.aid WHERE ((isnull(approved) or approved='YES') AND category > 10000)  GROUP BY category LIMIT 0, 12  (0.001s)
        [16] => SELECT ID_MEMBER AS user_id, memberName AS user_name FROM `cubey26_shastagal`.smf_members WHERE ID_MEMBER IN (1) (0.001s)
        [17] => SELECT owner_id as user_id,COUNT(DISTINCT a.aid) as alb_count,COUNT(DISTINCT pid) as pic_count,MAX(pid) as thumb_pid, MAX(galleryicon) as gallery_pid FROM cpg1410_albums AS a INNER JOIN cpg1410_pictures AS p ON p.aid = a.aid WHERE ((isnull(approved) or approved='YES') AND category > 10000)  GROUP BY user_id ORDER BY category LIMIT 0, 12  (0.001s)
    )

    ==========================
    GET :
    ------------------
    Array
    (
        [cat] => 1
    )

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

    ==========================
    VERSION INFO :
    ------------------
    PHP version: 5.2.0 - OK
    ------------------
    mySQL version: 5.0.24-log
    ------------------
    Coppermine version: 1.4.10(stable)
    ==========================
    Module: GD
    ------------------
    GD Version: bundled (2.0.28 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 2
    Client API version 4.1.15
    MYSQL_MODULE_TYPE external
    MYSQL_SOCKET /var/db/mysql/mysql.sock
    MYSQL_INCLUDE -I/usr/local/include/mysql
    MYSQL_LIBS -L/usr/local/lib/mysql -lmysqlclient 
    ==========================
    Module: zlib
    ------------------
    ZLib Support enabled
    Stream Wrapper support compress.zlib://
    Stream Filter support zlib.inflate, zlib.deflate
    Compiled Version 1.2.3
    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 | On | On
    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 | .:/hsphere/shared/apache/libexec/php5ext/php/ | .:/hsphere/shared/apache/libexec/php5ext/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 | 30 | 30
    max_input_time | 60 | 60
    upload_max_filesize | 2M | 2M
    post_max_size | 8M | 8M
    ==========================
    Page generated in 0.237 seconds - 18 queries in 0.015 seconds - Album set : AND aid IN (7,8,9) ; Meta set: AND aid IN (7,8,9) ;

Cubey

Oh yes, forgot to mention what action I'm taking when this occurs. I'm trying to access the user gallery:

http://shasta.illiop.com/gallery/index.php?cat=1

Cubey

Okay, this is getting annoying, havng to keep replying. The error seems to come and go as strange as that seems. It just stopping happening when I didn't do anything other than try to view it in another browser as a guest that wasn't logged in, and the page loaded fine. So I checked back on the error page in firefox and refreshed the page, and it loaded fine too.

Very strange indeed....

Joachim Müller

#3
Marking as "solved" then... Return if the error message re-appears. Don't post debug_output unless a supporter explicitely asks for it, as it only clutters a thread.

Cubey

Quote from: GauGau on April 19, 2007, 05:59:35 AMDon't post debug_output unless a supporter explicietyl asks for it, as it only clutters a thread.

Ah, sorry, now I see that the debug message says to post it "..if requested..". I missed those two little words when I read it. ;)

I think perhaps the problem was with my host and the MySQL server. Perhaps they were doing maintaince. Makes sense if it comes and goes. It hasn't done it since this afternoon nor did it do it before hand.