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: Problem Viewing Pics  (Read 7740 times)

0 Members and 1 Guest are viewing this topic.

strokesfan

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
Problem Viewing Pics
« on: December 20, 2010, 05:37:11 pm »

Hi,
On my site, KatieHolmes.com, I am able to view pictures when I am logged in as admin but guests click on the pictures and they give this error "There was an error while processing a database query". I searched and couldn't find anything on this. I tried repairing but the table was too big.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Problem Viewing Pics
« Reply #1 on: December 20, 2010, 05:59:02 pm »

Enable debug mode to see the real error message.
Logged

strokesfan

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
Re: Problem Viewing Pics
« Reply #2 on: December 20, 2010, 06:38:56 pm »

It says all of this - not sure what to make of any of it:

Code: [Select]
USER:
------------------
Array
(
    [ID] => eeb9649a8bbd4c69f101a9517df7
    [am] => 1
    [liv] => Array
        (
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 328
    [user_name] => ....
    [groups] => Array
        (
            [0] => 1
        )

    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 0
    [can_send_ecards] => 1
    [can_post_comments] => 1
    [can_upload_pictures] => 0
    [can_create_albums] => 1
    [has_admin_access] => 1
    [access_level] => 3
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [can_create_public_albums] => 0
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
    [allowed_albums] => Array
        (
        )

)

==========================
Queries:
------------------
Array
(
    [0] => SELECT name, value FROM cpg_config [include/init.inc.php:181] (0 ms)
    [1] => SELECT * FROM cpg_plugins ORDER BY priority [include/plugin_api.inc.php:54] (0 ms)
    [2] => SELECT user_id, time FROM `katie_gallery`.cpg_sessions WHERE session_id = '7cb89d1fcc817b0dfe3fada0904aad7a' [bridge/coppermine.inc.php:264] (0 ms)
    [3] => SELECT user_id, user_password FROM `katie_gallery`.cpg_users WHERE user_id = 32894 [bridge/coppermine.inc.php:276] (0 ms)
    [4] => SELECT u.user_id AS id, u.user_name AS username, user_password AS password, u.user_group AS group_id FROM `katie_gallery`.cpg_users AS u LEFT JOIN `katie_gallery`.cpg_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='32894' [bridge/udb_base.inc.php:70] (0 ms)
    [5] => SELECT user_group_list FROM `katie_gallery`.cpg_users AS u WHERE user_id='32894' AND user_group_list <> '' [bridge/coppermine.inc.php:202] (0 ms)
    [6] => 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(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, MAX(access_level) AS access_level, 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) [bridge/udb_base.inc.php:323] (0 ms)
    [7] => SELECT group_name FROM cpg_usergroups WHERE group_id= 1 [bridge/udb_base.inc.php:327] (0 ms)
    [8] => SELECT COUNT(*) FROM cpg_categorymap WHERE group_id in (1) [bridge/udb_base.inc.php:340] (0 ms)
    [9] => SELECT lang_id FROM cpg_languages WHERE enabled='YES' [include/init.inc.php:329] (0 ms)
    [10] => SELECT user_favpics FROM cpg_favpics WHERE user_id = 32894 [include/init.inc.php:387] (1 ms)
    [11] => DELETE FROM cpg_mod_online WHERE last_action < NOW() - INTERVAL 10 MINUTE [plugins/onlinestats/codebase.php:123] (0 ms)
    [12] => REPLACE INTO cpg_mod_online (user_id, user_name, user_ip, last_action) VALUES ('32894', 'Samantha', '75.82.218.78', NOW()) [plugins/onlinestats/codebase.php:128] (0 ms)
    [13] => DELETE FROM cpg_banned WHERE expiry < '2010-12-20 11:37:50' [include/init.inc.php:443] (0 ms)
    [14] => SELECT null FROM cpg_banned WHERE (user_id=32894 OR '75.82.218.78' LIKE ip_addr ) AND brute_force=0 LIMIT 1 [include/init.inc.php:459] (0 ms)
    [15] => SELECT name, description, thumb FROM cpg_categories WHERE cid = 1 [index.php:268] (0 ms)
    [16] => SELECT COUNT(DISTINCT(p.aid)) AS alb_count, COUNT(*) AS pic_count
        FROM cpg_albums AS a
        INNER JOIN cpg_pictures AS p ON p.aid = a.aid
        WHERE a.category > 10000
        AND approved = 'YES' [index.php:292] (0 ms)
    [17] => SELECT name, description, cid, thumb, depth, lft
        FROM cpg_categories AS c
        WHERE depth BETWEEN 0 + 1 AND 0 + 1
ORDER BY c.lft [index.php:316] (0 ms)
    [18] => SELECT category, COUNT(*) AS num
        FROM cpg_albums AS a
        INNER JOIN cpg_categories ON cid = category
        WHERE depth BETWEEN 0 + 1 AND 0 + 1
GROUP BY category ORDER BY NULL [index.php:358] (0 ms)
    [19] => SELECT title, r.description, keyword, category, aid, alb_hits, visibility, r.thumb, r.owner
        FROM cpg_categories AS c
        INNER JOIN cpg_albums AS r ON r.category = c.cid
        WHERE c.depth BETWEEN 0 + 1 AND 0 + 1
ORDER BY r.pos, r.aid [index.php:379] (0 ms)
    [20] => SELECT c.cid, r.aid, COUNT(pid) AS pic_count, MAX(pid) AS last_pid, MAX(ctime) AS last_upload
        FROM cpg_categories AS c
        INNER JOIN cpg_albums AS r ON r.category = c.cid
        INNER JOIN cpg_pictures AS p ON p.aid = r.aid
        WHERE (1)
        AND approved = 'YES'
        AND c.depth BETWEEN 0 + 1 AND 0 + 1
        GROUP BY r.aid
        ORDER BY NULL [index.php:414] (0 ms)
    [21] => SELECT COUNT(*) FROM cpg_albums AS a WHERE 1  [index.php:542] (0 ms)
    [22] => SELECT COUNT(*) FROM cpg_pictures WHERE approved = 'YES' [index.php:555] (0 ms)
    [23] => SELECT COUNT(*) FROM cpg_comments [index.php:574] (0 ms)
    [24] => SELECT COUNT(*) FROM cpg_categories [index.php:580] (0 ms)
    [25] => SELECT SUM(hits) FROM cpg_pictures WHERE approved = 'YES' [index.php:593] (0 ms)
    [26] => SELECT COUNT(*) FROM cpg_pictures WHERE approved = 'NO' [include/functions.inc.php:2418] (0 ms)
    [27] => SELECT lang_id, abbr FROM cpg_languages WHERE available='YES' AND enabled='YES' [include/themes.inc.php:2315] (0 ms)
    [28] => SELECT message FROM cpg_temp_messages  WHERE message_id = 'ede9b4734a391eb1c7c303bcf172b5a2' LIMIT 1 [include/functions.inc.php:4895] (0 ms)
    [29] => DELETE FROM cpg_temp_messages WHERE message_id = 'ede9b4734a391eb1c7c303bcf172b5a2' [include/functions.inc.php:4906] (0 ms)
    [30] => DELETE FROM cpg_temp_messages WHERE time < 1292863070 [include/functions.inc.php:4927] (0 ms)
    [31] => SELECT COUNT(*)
                FROM cpg_pictures AS r
                INNER JOIN cpg_albums AS a ON a.aid = r.aid
                WHERE (1)
                AND approved = 'YES' [include/functions.inc.php:1485] (0 ms)
    [32] => SELECT r.pid, r.aid, filepath, filename, url_prefix, pwidth, pheight, filesize, ctime, r.title, r.keywords, r.votes, pic_rating, hits, caption, r.owner_id, pic_raw_ip, pic_hdr_ip
                FROM cpg_pictures AS r
                INNER JOIN cpg_albums AS a ON a.aid = r.aid
                WHERE (1)
                AND approved = 'YES'
                ORDER BY r.pid DESC  LIMIT 0 ,10 [include/functions.inc.php:1501] (0 ms)
    [33] => SELECT extension, mime, content, player FROM cpg_filetypes [include/functions.inc.php:5789] (0 ms)
    [34] => SELECT count(aid) FROM cpg_albums as a WHERE category = '0'  [index.php:728] (0 ms)
    [35] => SELECT COUNT(*)
                FROM cpg_pictures AS r
                INNER JOIN cpg_albums AS a ON a.aid = r.aid
                WHERE (1)
                AND approved = 'YES'
                AND hits > 0 [include/functions.inc.php:1591] (0 ms)
    [36] => SELECT r.pid, r.aid, filepath, filename, url_prefix, pwidth, pheight, filesize, ctime, r.title, r.keywords, r.votes, pic_rating, hits, caption, r.owner_id, pic_raw_ip, pic_hdr_ip
                FROM cpg_pictures AS r
                INNER JOIN cpg_albums AS a ON a.aid = r.aid
                WHERE (1)
                AND approved = 'YES'
                AND hits > 0
                ORDER BY hits DESC, pid ASC
                 LIMIT 0 ,10 [include/functions.inc.php:1609] (199 ms)
    [37] => SELECT COUNT(*)
                FROM cpg_pictures AS r
                INNER JOIN cpg_albums AS a ON a.aid = r.aid
                WHERE (1)
                AND approved = 'YES'
                GROUP BY r.aid [include/functions.inc.php:1848] (0 ms)
    [38] => SELECT r.aid, a.thumb, a.keyword, a.alb_hits, a.title, MAX(ctime) AS ctime
                FROM cpg_pictures AS r
                INNER JOIN cpg_albums AS a ON a.aid = r.aid
                WHERE (1)
                AND approved = 'YES'
                GROUP BY r.aid
                ORDER BY ctime DESC
                 LIMIT 0 ,10 [include/functions.inc.php:1860] (0 ms)
    [39] => SELECT pid FROM cpg_pictures WHERE ((aid = '1534' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [40] => SELECT pid FROM cpg_pictures WHERE ((aid = '1531' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [41] => SELECT pid FROM cpg_pictures WHERE ((aid = '1533' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [42] => SELECT pid FROM cpg_pictures WHERE ((aid = '1532' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [43] => SELECT pid FROM cpg_pictures WHERE ((aid = '1530' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [44] => SELECT pid FROM cpg_pictures WHERE ((aid = '1529' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [45] => SELECT pid FROM cpg_pictures WHERE ((aid = '1528' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [46] => SELECT pid FROM cpg_pictures WHERE ((aid = '1527' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [47] => SELECT pid FROM cpg_pictures WHERE ((aid = '1526' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [48] => SELECT pid FROM cpg_pictures WHERE ((aid = '1525' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [49] => SELECT r.pid, r.aid, filepath, filename, url_prefix, pwidth, pheight, filesize, ctime, r.title, r.keywords, r.votes, pic_rating, hits, caption, r.owner_id, pic_raw_ip, pic_hdr_ip
                    FROM cpg_pictures AS r
                    WHERE approved = 'YES'
                    AND r.pid IN (99660,99625,99615,99571,99561,99556,99524,99514,99490,99483) [include/functions.inc.php:1902] (0 ms)
)

==========================
GET :
------------------
Array
(
    [message_id] => ede9b4734a391eb1c7c303bcf172b5a2
    [message_icon] => success
)

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

==========================
COOKIE :
------------------
Array
(
    [cpgnew_data] => YTozOntzOjI6IklEIjtzOjMyOiJlZWJmOTY0OWE4YmJkNGM2OWYxMDViMWE5NTE3ZGY3NSI7czoyOiJhbSI7aToxO3M6MzoibGl2IjthOjA6e319
    [CP] => null*
    [s_sess] =>  s_cc=true; s_sq=;
    [s_pers] =>  s_visRef=1|1292868468580;
    [__qca] => P0-1011994193-1292866614689
    [__utma] => 76241423.1492380034.1292866615.1292866615.1292866615.1
    [__utmb] => 76241423.12.10.1292866615
    [__utmc] => 76241423
    [__utmz] => 76241423.1292866615.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
    [983d76a20ea4759f919becf5175b5ee8] => 49f7e233f13eff3151842b40a1ffe507
)

==========================
VERSION INFO :
------------------
PHP version        5.3.1            OK   
MySQL version      5.0.91-community OK   
Coppermine version 1.5.10           stable

==========================
Module: GD
------------------
Exact version                    2.0.34                     
GD Version                       bundled (2.0.34 compatible)
FreeType Support                 1                         
FreeType Linkage                 with freetype             
T1Lib Support                                               
GIF Read Support                 1                         
GIF Create Support               1                         
JPEG Support                     1                         
PNG Support                      1                         
WBMP Support                     1                         
XPM Support                      1                         
XBM Support                      1                         
JIS-mapped Japanese Font Support                           

==========================
Key config settings
------------------
site_url             http://katieholmes.com/gallery/                     
charset              language file                                       
allow_private_albums 0                                                   
cookie_name          cpgnew                                             
cookie_path          /                                                   
impath               /usr/bin/                                           
lang                 english                                             
main_page_layout     lastup,2/breadcrumb/catlist/alblist/topn,2/lastalb,2
silly_safe_mode      0                                                   
smtp_host                                                               
theme                katie-light                                         
thumb_method         gd2                                                 

==========================
Plugins
------------------
Name           Onlinestats                                                                   
Actions        plugin_install, page_start, plugin_uninstall, plugin_cleanup, plugin_configure
Filters        plugin_block                                                                 
--------------
Name           Newsletter                                                                   
Actions        plugin_configure, plugin_install, plugin_uninstall, plugin_cleanup, page_start
Filters                                                                                     
--------------
Name           Final_Extract                                                                 
Actions                                                                                     
Filters        page_html                                                                     
--------------
Name           CAPTCHA                                                                       
Actions        plugin_install, plugin_configure, plugin_uninstall, page_start               
Filters        page_html                                                                     
--------------

==========================
Server restrictions
------------------
safe_mode                                                 
safe_mode_exec_dir                                       
safe_mode_gid                                             
safe_mode_include_dir                                     
sql.safe_mode                                             
disable_functions                                         
file_uploads             1                               
include_path             .:/usr/lib/php:/usr/local/lib/php
open_basedir                                             
allow_url_fopen          1                               
max_execution_time       30                               
max_input_time           60                               
upload_max_filesize      2M                               
post_max_size            8M                               
memory_limit             32M                             
suhosin.post.max_vars                                     
suhosin.request.max_vars                                 


==========================
Page (performance)
------------------
Parameter        Current  Peak   
Memory usage     5.61 MiB 7.10 MiB
Page generation  291 ms   291 ms 
Page query time  200 ms   200 ms 
Page query count 50       50     


==========================
               
« Last Edit: December 20, 2010, 06:40:48 pm by Jeff Bailey »
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Problem Viewing Pics
« Reply #3 on: December 20, 2010, 06:42:39 pm »

Please enable debug mode for everyone.
When you look at it as admin the error won't show in debug becuase the problem does not exits when logged in as admin.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

strokesfan

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
Re: Problem Viewing Pics
« Reply #4 on: December 20, 2010, 08:37:09 pm »

Sorry about that, here it is:

Code: [Select]
USER:
------------------
Array
(
    [ID] => df549e02cae59c99a2aa3cd82643a7b4
    [am] => 1
)

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

    [group_quota] => 0
    [can_rate_pictures] => 0
    [can_send_ecards] => 0
    [can_post_comments] => 0
    [can_upload_pictures] => 0
    [can_create_albums] => 0
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [access_level] => 3
    [disk_max] => 0
    [disk_min] => 0
    [has_admin_access] => 0
    [group_name] => Guests
    [can_create_public_albums] => 0
    [can_see_all_albums] => 0
    [group_id] => 3
    [allowed_albums] => Array
        (
        )

)

==========================
Queries:
------------------
Array
(
    [0] => SELECT name, value FROM cpg_config [include/init.inc.php:181] (0 ms)
    [1] => SELECT * FROM cpg_plugins ORDER BY priority [include/plugin_api.inc.php:54] (0 ms)
    [2] => SELECT user_id, time FROM `katie_gallery`.cpg_sessions WHERE session_id = 'c5c1474a6f46728e1e21ea715608b7eb' [bridge/coppermine.inc.php:264] (0 ms)
    [3] => SELECT user_id, user_password FROM `katie_gallery`.cpg_users WHERE user_id = 0 [bridge/coppermine.inc.php:276] (1 ms)
    [4] => 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(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, MAX(access_level) AS access_level, 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 (3) [bridge/udb_base.inc.php:323] (1 ms)
    [5] => SELECT group_name FROM cpg_usergroups WHERE group_id= 3 [bridge/udb_base.inc.php:327] (0 ms)
    [6] => SELECT COUNT(*) FROM cpg_categorymap WHERE group_id in (3) [bridge/udb_base.inc.php:340] (0 ms)
    [7] => SELECT aid FROM cpg_albums WHERE moderator_group IN (3) [include/init.inc.php:271] (0 ms)
    [8] => SELECT lang_id FROM cpg_languages WHERE enabled='YES' [include/init.inc.php:329] (0 ms)
    [9] => DELETE FROM cpg_mod_online WHERE last_action < NOW() - INTERVAL 10 MINUTE [plugins/onlinestats/codebase.php:123] (0 ms)
    [10] => SELECT user_ip FROM cpg_mod_online WHERE user_ip LIKE '75.82%' [plugins/onlinestats/codebase.php:133] (0 ms)
    [11] => INSERT INTO cpg_mod_online (user_id, user_name, user_ip, last_action) VALUES ('0', 'Guest', '75.82.218.78', NOW()) [plugins/onlinestats/codebase.php:140] (0 ms)
    [12] => DELETE FROM cpg_banned WHERE expiry < '2010-12-20 13:36:47' [include/init.inc.php:443] (0 ms)
    [13] => SELECT null FROM cpg_banned WHERE ('75.82.218.78' LIKE ip_addr ) AND brute_force=0 LIMIT 1 [include/init.inc.php:459] (0 ms)
    [14] => SELECT name, description, thumb FROM cpg_categories WHERE cid = 1 [index.php:268] (0 ms)
    [15] => SELECT COUNT(DISTINCT(p.aid)) AS alb_count, COUNT(*) AS pic_count
        FROM cpg_albums AS a
        INNER JOIN cpg_pictures AS p ON p.aid = a.aid
        WHERE a.category > 10000
        AND approved = 'YES' [index.php:292] (0 ms)
    [16] => SELECT name, description, cid, thumb, depth, lft
        FROM cpg_categories AS c
        WHERE depth BETWEEN 0 + 1 AND 0 + 1
ORDER BY c.lft [index.php:316] (0 ms)
    [17] => SELECT category, COUNT(*) AS num
        FROM cpg_albums AS a
        INNER JOIN cpg_categories ON cid = category
        WHERE depth BETWEEN 0 + 1 AND 0 + 1
GROUP BY category ORDER BY NULL [index.php:358] (0 ms)
    [18] => SELECT title, r.description, keyword, category, aid, alb_hits, visibility, r.thumb, r.owner
        FROM cpg_categories AS c
        INNER JOIN cpg_albums AS r ON r.category = c.cid
        WHERE c.depth BETWEEN 0 + 1 AND 0 + 1
ORDER BY r.pos, r.aid [index.php:379] (0 ms)
    [19] => SELECT c.cid, r.aid, COUNT(pid) AS pic_count, MAX(pid) AS last_pid, MAX(ctime) AS last_upload
        FROM cpg_categories AS c
        INNER JOIN cpg_albums AS r ON r.category = c.cid
        INNER JOIN cpg_pictures AS p ON p.aid = r.aid
        WHERE (1)
        AND approved = 'YES'
        AND c.depth BETWEEN 0 + 1 AND 0 + 1
        GROUP BY r.aid
        ORDER BY NULL [index.php:414] (0 ms)
    [20] => SELECT COUNT(*) FROM cpg_albums AS a WHERE 1  [index.php:542] (0 ms)
    [21] => SELECT COUNT(*) FROM cpg_pictures WHERE approved = 'YES' [index.php:555] (0 ms)
    [22] => SELECT COUNT(*) FROM cpg_comments [index.php:574] (0 ms)
    [23] => SELECT COUNT(*) FROM cpg_categories [index.php:580] (0 ms)
    [24] => SELECT SUM(hits) FROM cpg_pictures WHERE approved = 'YES' [index.php:593] (0 ms)
    [25] => SELECT message FROM cpg_temp_messages  WHERE message_id = 'dd4efaee098fa8015d80a2c237997bef' LIMIT 1 [include/functions.inc.php:4895] (0 ms)
    [26] => DELETE FROM cpg_temp_messages WHERE message_id = 'dd4efaee098fa8015d80a2c237997bef' [include/functions.inc.php:4906] (0 ms)
    [27] => SELECT COUNT(*)
                FROM cpg_pictures AS r
                INNER JOIN cpg_albums AS a ON a.aid = r.aid
                WHERE (1)
                AND approved = 'YES' [include/functions.inc.php:1485] (0 ms)
    [28] => SELECT r.pid, r.aid, filepath, filename, url_prefix, pwidth, pheight, filesize, ctime, r.title, r.keywords, r.votes, pic_rating, hits, caption, r.owner_id
                FROM cpg_pictures AS r
                INNER JOIN cpg_albums AS a ON a.aid = r.aid
                WHERE (1)
                AND approved = 'YES'
                ORDER BY r.pid DESC  LIMIT 0 ,10 [include/functions.inc.php:1501] (0 ms)
    [29] => SELECT extension, mime, content, player FROM cpg_filetypes [include/functions.inc.php:5789] (0 ms)
    [30] => SELECT count(aid) FROM cpg_albums as a WHERE category = '0'  [index.php:728] (0 ms)
    [31] => SELECT COUNT(*)
                FROM cpg_pictures AS r
                INNER JOIN cpg_albums AS a ON a.aid = r.aid
                WHERE (1)
                AND approved = 'YES'
                AND hits > 0 [include/functions.inc.php:1591] (0 ms)
    [32] => SELECT r.pid, r.aid, filepath, filename, url_prefix, pwidth, pheight, filesize, ctime, r.title, r.keywords, r.votes, pic_rating, hits, caption, r.owner_id
                FROM cpg_pictures AS r
                INNER JOIN cpg_albums AS a ON a.aid = r.aid
                WHERE (1)
                AND approved = 'YES'
                AND hits > 0
                ORDER BY hits DESC, pid ASC
                 LIMIT 0 ,10 [include/functions.inc.php:1609] (0 ms)
    [33] => SELECT COUNT(*)
                FROM cpg_pictures AS r
                INNER JOIN cpg_albums AS a ON a.aid = r.aid
                WHERE (1)
                AND approved = 'YES'
                GROUP BY r.aid [include/functions.inc.php:1848] (0 ms)
    [34] => SELECT r.aid, a.thumb, a.keyword, a.alb_hits, a.title, MAX(ctime) AS ctime
                FROM cpg_pictures AS r
                INNER JOIN cpg_albums AS a ON a.aid = r.aid
                WHERE (1)
                AND approved = 'YES'
                GROUP BY r.aid
                ORDER BY ctime DESC
                 LIMIT 0 ,10 [include/functions.inc.php:1860] (0 ms)
    [35] => SELECT pid FROM cpg_pictures WHERE ((aid = '1534' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [36] => SELECT pid FROM cpg_pictures WHERE ((aid = '1531' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [37] => SELECT pid FROM cpg_pictures WHERE ((aid = '1533' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [38] => SELECT pid FROM cpg_pictures WHERE ((aid = '1532' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [39] => SELECT pid FROM cpg_pictures WHERE ((aid = '1530' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [40] => SELECT pid FROM cpg_pictures WHERE ((aid = '1529' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [41] => SELECT pid FROM cpg_pictures WHERE ((aid = '1528' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [42] => SELECT pid FROM cpg_pictures WHERE ((aid = '1527' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [43] => SELECT pid FROM cpg_pictures WHERE ((aid = '1526' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [44] => SELECT pid FROM cpg_pictures WHERE ((aid = '1525' ) ) AND approved='YES' ORDER BY ctime DESC LIMIT 0,1 [include/functions.inc.php:1886] (0 ms)
    [45] => SELECT r.pid, r.aid, filepath, filename, url_prefix, pwidth, pheight, filesize, ctime, r.title, r.keywords, r.votes, pic_rating, hits, caption, r.owner_id
                    FROM cpg_pictures AS r
                    WHERE approved = 'YES'
                    AND r.pid IN (99660,99625,99615,99571,99561,99556,99524,99514,99490,99483) [include/functions.inc.php:1902] (0 ms)
)

==========================
GET :
------------------
Array
(
    [message_id] => dd4efaee098fa8015d80a2c237997bef
    [message_icon] => info
)

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

==========================
COOKIE :
------------------
Array
(
    [cpgnew_data] => YToyOntzOjI6IklEIjtzOjMyOiJkZjU0OWUwMmNhZTU5Yzk5YTJhYTNjZDgyNjQzYTdiNCI7czoyOiJhbSI7aToxO30=
    [CP] => null*
    [s_sess] =>  s_cc=true; s_sq=;
    [s_pers] =>  s_visRef=1|1292875605064;
    [__qca] => P0-894857344-1292873774716
    [__utma] => 76241423.203768720.1292873775.1292873775.1292873775.1
    [__utmb] => 76241423.10.10.1292873775
    [__utmc] => 76241423
    [__utmz] => 76241423.1292873775.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
    [983d76a20ea4759f919becf5175b5ee8] => 7bfa14af6703211fedfb946d919186fa
)

==========================
               

Thanks again for all the help!
« Last Edit: December 20, 2010, 08:47:15 pm by Jeff Bailey »
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Problem Viewing Pics
« Reply #5 on: December 20, 2010, 08:51:28 pm »

Please don't post debug info unless requested. We just need you to turn it on.
This is the error we were looking for.
Code: [Select]
While executing query 'INSERT INTO cpg_hit_stats SET pid = 99659, search_phrase = '', Ip   = '138.162.128.55', sdate = '1292874437', referer='http://katieholmes.com/gallery/', browser = 'IE7', os = 'Windows XP', uid ='0'' in include/functions.inc.php on line 2765

mySQL error: Table './katie_gallery/cpg_hit_stats' is marked as crashed and last (automatic?) repair failed

http://documentation.coppermine-gallery.net/en/errors.htm#errors_messages_database
read the information at the link
Especially this part.
Quote
This is not a coppermine issue, but a mySQL issue. It just may affect a database table used by Coppermine.
Use your website's Control Panel to repair the table, or use phpMyAdmin to execute this sql query: REPAIR TABLE yourPrefix_tableName
(Replace yourPrefix_tableName with your table name, e.g. cpg145_pictures)
If you don't understand the solution, ask your webhost to make the above changes.

If you are not sure how to use phpmyadmin or another mysql tool please contact your host to perform the repair.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

strokesfan

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
Re: Problem Viewing Pics
« Reply #6 on: December 20, 2010, 09:59:24 pm »

It said this when I tried to repair:

There the database ./katie_gallery/cpg_hit_stats' is marked as crashed. Sadly when I tried to repair it i had:

File './katie_gallery/cpg_hit_stats.MYD' not found (Errcode: 2)


Is there anything else that could be done?
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Problem Viewing Pics
« Reply #7 on: December 20, 2010, 10:08:38 pm »

use
Code: [Select]
REPAIR TABLE cpg_hit_stats
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

strokesfan

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
Re: Problem Viewing Pics
« Reply #8 on: December 20, 2010, 10:13:32 pm »

It said this:


| katie_gallery.cpg_hit_stats | repair | Error    | File './katie_gallery/cpg_hit_stats.MYD' not found (Errcode: 2) |
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Problem Viewing Pics
« Reply #9 on: December 20, 2010, 10:17:37 pm »

Make sure the table exists in the database. If it doesn't you'll have to create it manually or restore it from a back up.
If it does exist contact your host to help you with the error.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

strokesfan

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
Re: Problem Viewing Pics
« Reply #10 on: December 20, 2010, 10:18:21 pm »

I don't have a backup - how would I manually create it?
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Problem Viewing Pics
« Reply #11 on: December 20, 2010, 10:23:45 pm »

Are you saying it doesn't exist in your database?
Your host should have some sort of backup.

I don't have the time to write out the mySQL to create the table right now.
Contact your host before you make someone go though the trouble.

This is a mySQL issue unrealated to Coppermine.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

strokesfan

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
Re: Problem Viewing Pics
« Reply #12 on: December 20, 2010, 10:31:19 pm »

The problem started a week ago before the weekly backup was made so I only have a backup of the problem. Thanks again, I'll look around.
Logged

strokesfan

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
Re: Problem Viewing Pics
« Reply #13 on: December 20, 2010, 10:58:40 pm »

Last Question: Could I just get the table from another mysql that works on my server?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Problem Viewing Pics
« Reply #14 on: December 20, 2010, 11:15:07 pm »

Your hit_stats table is missing. Just deleting the table and creating it from scratch (have a look at the schema.sql file in the sql/ folder) should work, but all your hit stats will be lost in that case.
Logged
Pages: [1]   Go Up
 

Page created in 0.065 seconds with 19 queries.