[Solved]: Problem mit Datenbank (is marked as crashed and should be repaired) [Solved]: Problem mit Datenbank (is marked as crashed and should be repaired)
 

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

[Solved]: Problem mit Datenbank (is marked as crashed and should be repaired)

Started by cap, June 03, 2008, 12:28:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cap

Habe eben Bilder per Patch hinzugefügt und wollte die Dateiinformationen anpassen. Beim Speichern kam dann eine Fehermeldung und ich konnte keine Bilder mehr anzeigen lassen ohne eine Fehlermeldung. Nach dem einschalten des Debug-Modus bekam ich dann folgende detailliertere Fehlermeldung:

Zugangsdaten zur Datenbank (phpMyAdmin) gebe ich gerne per PN an. würde mich sehr über eine Hilfe freuen.


While executing query "SELECT count(*) FROM cpg14x_pictures as p, cpg14x_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 3" on 0

mySQL error: Table './denzinge_coppermine1416/cpg14x_pictures' is marked as crashed and should be repaired


USER:
------------------
Array
(
    [ID] => 007a5dd9cf62d3fa93e37cc5951e03ea
    [am] => 1
    [liv] => Array
        (
            [0] => 1139
            [1] => 432
            [2] => 431
            [3] => 991
            [4] => 990
        )

    [lap] => 3
)

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

    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 0
    [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] => 0
    [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
(
    [0] => SELECT extension, mime, content, player FROM cpg14x_filetypes; (0.001s)
    [1] => select * from cpg14x_plugins order by priority asc; (0.001s)
    [2] => delete from `denzinge_coppermine1416`.cpg14x_sessions where time<1212440361 and remember=0; (0s)
    [3] => delete from `denzinge_coppermine1416`.cpg14x_sessions where time<1211234361; (0s)
    [4] => select user_id from `denzinge_coppermine1416`.cpg14x_sessions where session_id=md5("429ac502808b521da438f1f6353aded2b9d6e1c3c3c2ced9422da88e03f9f4a3"); (0.001s)
    [5] => select user_id as id, user_password as password from `denzinge_coppermine1416`.cpg14x_users where user_id=1 (0.003s)
    [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 `denzinge_coppermine1416`.cpg14x_users AS u INNER JOIN `denzinge_coppermine1416`.cpg14x_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0.001s)
    [7] => SELECT user_group_list FROM `denzinge_coppermine1416`.cpg14x_users AS u WHERE user_id='1' and user_group_list <> ''; (0s)
    [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 cpg14x_usergroups WHERE group_id in (1) (0.001s)
    [9] => SELECT group_name FROM  cpg14x_usergroups WHERE group_id= 1 (0.001s)
    [10] => update `denzinge_coppermine1416`.cpg14x_sessions set time='1212443961' where session_id=md5('429ac502808b521da438f1f6353aded2b9d6e1c3c3c2ced9422da88e03f9f4a3'); (0.002s)
    [11] => SELECT description from cpg14x_albums WHERE aid='' (0s)
    [12] => SELECT user_favpics FROM cpg14x_favpics WHERE user_id = 1 (0s)
    [13] => SELECT * FROM cpg14x_shop_config ORDER BY priority ASC (0.001s)
    [14] => SHOW TABLES LIKE 'cpg14x_cms_config' (0.001s)
    [15] => SELECT * FROM cpg14x_cms_config (0.001s)
    [16] => SELECT home,login,my_gallery,upload_pic,album_list,lastup,lastcom,topn,toprated,favpics,search,my_profile FROM cpg14x_final_extract_config WHERE Group_Id=1 (0.001s)
    [17] => SELECT count(*) FROM  cpg14x_pms WHERE owner=1 (0s)
    [18] => SELECT count(*) FROM  cpg14x_pms WHERE owner=1 AND showed='0' (0s)
    [19] => SELECT count(*) FROM  cpg14x_buddy WHERE user_id=1 (0s)
    [20] => SELECT count(*) FROM  cpg14x_buddy_req WHERE buddy_to=1 (0s)
    [21] => DELETE FROM cpg14x_banned WHERE expiry < '2008-06-02 21:59:21' (0.001s)
    [22] => SELECT * FROM cpg14x_banned WHERE (ip_addr='84.226.11.XXX' OR ip_addr='84.226.11.XXX' OR user_id=1) AND brute_force=0 (0.001s)
    [23] => SELECT cid, name, description, thumb FROM cpg14x_categories WHERE parent = ''  ORDER BY pos (0.001s)
    [24] => SELECT aid FROM cpg14x_albums WHERE category = 3 (0s)
    [25] => SELECT count(*) FROM cpg14x_pictures as p, cpg14x_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 3 (0.003s)
    [26] => SELECT COUNT(*) FROM cpg14x_pictures WHERE approved = 'NO' (0s)
)

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

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

==========================
VERSION INFO :
------------------
PHP version: 5.2.5 - OK
------------------
mySQL version: 5.1.22-rc
------------------
Coppermine version: 1.4.16(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.34 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support: 1
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.22
MYSQL_MODULE_TYPE no value
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE no value
MYSQL_LIBS no value
==========================
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 | 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 | .:/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 | 60 | 60
upload_max_filesize | 16M | 16M
post_max_size | 16M | 16M
==========================
Page generated in 0.073 seconds - 27 queries in 0.021 seconds - Album set : ; Meta set: ;

cap


cap

Hallo Nnochmals,

Konnte mir jetzt selber helfen!  ;D

Nach über zwei Stunde der Lösungssuche und lesen von Beiträgen in diversen Foren habe ich die Lösung von Nibbler auf diesem (englischen) Forum gefunden.

http://forum.coppermine-gallery.net/index.php/topic,50723.msg244648.html#msg244648

Die Lösung, wenn man sie erst mal gefunden hat, ist ser einfach, so dass sogar ich sie machen konnte.
Man geht ins (phpMyAdmin) und wählt das Register "SQL". Da gibt man nun direkt den folgenden SQL-Befehl ein:

"REPAIR TABLE cpg_tabellenname der defekten Tabelle"  in meinem Fall also "REPAIR TABLE cpg_pictures" (jeweils ohne Anführungszeichen).

und siehe da, alles läuft wieder wie es soll.
Herzlichen dank an Nibbler für diesen Tipp. Jetzt noch schnell eine Sicherung der Datenbank machen (meine Letzte war schon drei Monate alt).