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: Interesting Critical Error Problem...  (Read 3115 times)

0 Members and 1 Guest are viewing this topic.

PCGUY112887

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Interesting Critical Error Problem...
« on: February 05, 2005, 02:37:40 am »

Some of you may have seen my post that I made a week or so ago about my odd SQL error.  Well when I was messing around I changed back to Classic theme, and look the error disappears... So I changed back to my default (FiBlack3Dblue) template and the error is gone... AMAZING!

The next day after me doing that the critical error started comming up again... I went changed the theme and changed back, gone.  AMAZING!

Then today I came home, worked fine, went out for a whial and came back, critical error again.  So I changed the theme back to classic then back to my default and it's gone again!

That's the reason I post it in the Themes section.. because when I change the theme and change it back it works fine again for about a day.  I've had other people look and when I see it as Error and working they see the same, tried refreshing, different browsers, etc...

I'm not sure what the error is this time... because it doesn't say it in the Critical Error box like it did before.  If it happens again (probally will) i'll kick it in debug mode and see what's goin on... but in the mean time anyone ever see anything like this?

URL to gallery so you can check it's status...
http://www.spudfiles.com/gallery
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Interesting Critical Error Problem...
« Reply #1 on: February 05, 2005, 02:48:35 am »

Switch to classic and leave it there for a few days.  If you get no errors, then you know that other theme is wreaking havok.  It's a user contribution, so we don't have a lot of experience with it, but we'll try to help figure out what's causing the problems.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Interesting Critical Error Problem...
« Reply #2 on: February 05, 2005, 03:03:48 am »

From a quick look, I see a few problems.

The template.html file is really messed up.  The <body> tag is missing, there are missing <table> tags, missing </table> tags... just a lot of bad HTML in it.

theme.php: function theme_display_breadcrumb has a starttable but no endtable.  I believe the function should be
Code: [Select]
function theme_display_breadcrumb($breadcrumb, &$cat_data)
{
    /**
     * ** added breadcrumb as a seperate element
     */
    global $template_breadcrumb, $lang_breadcrumb;

    starttable('100%');
    if ($breadcrumb) {
        $template = template_extract_block($template_breadcrumb, 'breadcrumb');
        $params = array('{BREADCRUMB}' => $breadcrumb
            );
        echo template_eval($template, $params);
    }
    endtable();
}

I'm not wasting my time trying to figure out how to fix the template.html file.  Just way too screwed up.  Perhaps you can go to DaMysterious, since he did the conversion.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

PCGUY112887

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Interesting Critical Error Problem...
« Reply #3 on: February 06, 2005, 03:59:23 am »

Wow... template.html is really messed up... I didn't even notice it till now.

Hehe it never even starts a <table> yet it ends </table> like 20 times :P

And i'm going to try the change in theme.php... what I don't see if why it would have been fine but all of a sudden start this...
It didn't start doing this untill I added a custom header (php, using {CUSTOM_HEADER} ) and some meta tags to the template.html... but I don't see how that would have effected it.
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Interesting Critical Error Problem...
« Reply #4 on: February 06, 2005, 01:41:41 pm »

Hard to say without seeing what you've added.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

PCGUY112887

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Interesting Critical Error Problem...
« Reply #5 on: February 06, 2005, 06:32:34 pm »

Here are the files straight from my server if you would like to look at them...
Logged

PCGUY112887

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Interesting Critical Error Problem...
« Reply #6 on: February 07, 2005, 05:23:22 am »

Allright I got the error...

Quote
While executing query "SELECT count(*) FROM cpg132_pictures WHERE 1" on 0

mySQL error: Access denied for user: 'pcguy@localhost' (Using password: NO)
As soon as I change the theme/change it back it works.

Here is debug...
Quote
USER:
------------------
Array
(
    [ID] => fb1b3532653fc4a1a1f0cecd46653a9d
    [am] => 1
    [liv] => Array
        (
           
  • => 72
  • [1] => 74
                [2] => 69
                [3] => 75
                [4] => 57
            )

       
[name] => PCGUY
)

==========================
USER DATA:
------------------
Array
(
   
  • => 2
[user_id] => 2
    [1] => PCGUY
    [user_name] => PCGUY
    [2] => 1
    [user_level] => 1
    [groups] => Array
        (
           
  • => 1
  • [1] => 2
            )

       
[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] => 0
    [upload_form_config] => 3
    [num_file_upload] => 10
    [num_URI_upload] => 10
    [custom_user_upload] => 0
    [disk_max] => 5120
    [disk_min] => 0
    [ufc_max] => 3
    [ufc_min] => 1
    [has_admin_access] => 1
    [group_name] => Admin
    [can_see_all_albums] => 1
    [group_id] => 1
)

==========================
Queries:
------------------
Array
(
   
  • => SELECT extension, mime, content FROM cpg132_filetypes;
  • [1] => SELECT user_id, username as user_name, user_level FROM `pcguy_gallery`.phpbb_sessions INNER JOIN `pcguy_gallery`.phpbb_users ON session_user_id = user_id WHERE session_id='11a934eee3a55ff683bc5f35daded9bd' AND session_user_id ='2' AND user_active='1'
        [2] => SELECT (ug.group_id + 5) as group_id FROM `pcguy_gallery`.phpbb_user_group as ug LEFT JOIN `pcguy_gallery`.phpbb_groups as g ON ug.group_id = g.group_id WHERE user_id = 2 AND user_pending = 0 AND group_single_user = 0
        [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 cpg132_usergroups WHERE group_id in (1,2)
        [4] => SELECT group_name FROM  cpg132_usergroups WHERE group_id= 1
        [5] => DELETE FROM cpg132_banned WHERE expiry < 1107749981
        [6] => SELECT * FROM cpg132_banned WHERE ip_addr='69.220.85.16' OR ip_addr='69.220.85.16' OR user_id=2
        [7] => SELECT cid, name, description, thumb FROM cpg132_categories WHERE parent = ''  ORDER BY pos
        [8] => SELECT aid FROM cpg132_albums as a WHERE category>=10000
        [9] => SELECT count(*) FROM cpg132_pictures as p, cpg132_albums as a WHERE p.aid = a.aid AND category >= 10000
        [10] => SELECT cid, name, description, thumb FROM cpg132_categories WHERE parent = '1'  ORDER BY pos
        [11] => SELECT aid FROM cpg132_albums as a WHERE category = '0'
        [12] => SELECT count(*) FROM cpg132_albums as a WHERE 1
        [13] => SELECT count(*) FROM cpg132_pictures as p LEFT JOIN cpg132_albums as a ON a.aid=p.aid WHERE 1
        [14] => SELECT count(*) FROM cpg132_comments as c LEFT JOIN cpg132_pictures as p ON c.pid=p.pid LEFT JOIN cpg132_albums as a ON a.aid=p.aid WHERE 1
        [15] => SELECT count(*) FROM cpg132_categories WHERE 1
        [16] => SELECT sum(hits) FROM cpg132_pictures as p LEFT JOIN cpg132_albums as a ON p.aid=a.aid WHERE 1
        [17] => SELECT count(*) FROM cpg132_albums as a WHERE category = '0'
        [18] => SELECT a.aid, a.title, a.description, visibility, filepath, filename, url_prefix, pwidth, pheight FROM cpg132_albums as a LEFT JOIN cpg132_pictures as p ON a.thumb=p.pid WHERE category=0 ORDER BY a.pos LIMIT 0,4
        [19] => SELECT aid, count(pid) as pic_count, max(pid) as last_pid, max(ctime) as last_upload FROM cpg132_pictures WHERE aid IN (3, 4, 1, 2) AND approved = 'YES' GROUP BY aid
        [20] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg132_pictures WHERE pid='75'
        [21] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg132_pictures WHERE pid='74'
        [22] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg132_pictures WHERE pid='72'
        [23] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg132_pictures WHERE pid='65'
        [24] => SELECT COUNT(*) from cpg132_pictures WHERE approved = 'YES'
        [25] => SELECT pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, aid,title, caption, owner_id, owner_name, aid FROM cpg132_pictures WHERE approved = 'YES'  ORDER BY pid DESC  LIMIT 0 ,4
    )

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

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

    ==========================
    VERSION INFO :
    ------------------
    PHP version: 4.3.9 - OK
    ------------------
    <br />
    <b>Warning</b>:  mysql_query(): Access denied for user: 'pcguy@localhost' (Using password: NO) in <b>/home/pcguy/public_html/gallery/include/functions.inc.php</b> on line <b>1525</b><br />
    <br />
    <b>Warning</b>:  mysql_query(): A link to the server could not be established in <b>/home/pcguy/public_html/gallery/include/functions.inc.php</b> on line <b>1525</b><br />
    <br />
    <b>Warning</b>:  mysql_fetch_row(): supplied argument is not a valid MySQL result resource in <b>/home/pcguy/public_html/gallery/include/functions.inc.php</b> on line <b>1526</b><br />
    mySQL version:
    ------------------
    Coppermine version: 1.3.2
    ==========================
    Module: gd
    ------------------
    GD Support enabled
    GD Version bundled (2.0.28 compatible)
    FreeType Support enabled
    FreeType Linkage with freetype
    GIF Read Support enabled
    GIF Create Support enabled
    JPG Support enabled
    PNG Support enabled
    WBMP Support enabled
    XBM Support enabled
    ==========================
    Module: mysql
    ------------------
    Active Persistent Links 0
    Active Links 0
    Client API version 4.0.22
    MYSQL_MODULE_TYPE external
    MYSQL_SOCKET /var/lib/mysql/mysql.sock
    MYSQL_INCLUDE -I/usr/include/mysql
    MYSQL_LIBS -L/usr/lib -lmysqlclient 
    ==========================
    Module: zlib
    ------------------
    ZLib Support enabled
    Compiled Version 1.1.4
    Linked Version 1.1.4
    ==========================
    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/lib/php:/usr/local/lib/php | .:/usr/lib/php:/usr/local/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 | 30 | 30
    max_input_time | -1 | -1
    upload_max_filesize | 15M | 15M
    post_max_size | 55M | 55M
    ==========================
    Page generated in 0.071 seconds - 26 queries in 0.009 seconds - Album set :
Notice
Quote
<b>Warning</b>:  mysql_fetch_row(): supplied argument is not a valid MySQL result resource in <b>/home/pcguy/public_html/gallery/include/functions.inc.php</b> on line <b>1526</b>
In there?
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.