Error al procesar la consulta Error al procesar la consulta
 

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

Error al procesar la consulta

Started by pau_cg, November 20, 2010, 11:01:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pau_cg

Hace un par de semanas quise actualizar la version 1.4 a la 1.5 Al parecer lo habia hecho sin inconvenientes, pero la nueva version no me aceptaba mi theme personalizado, por lo que opte regresar a la version anterior. Recargue el buck up que habia hecho (tanto de la galeria como de la base de datos) pero desde entonces cuando intento ver algun album me sale el mensaje "HUBO UN ERROR AL PROCESAR LA CONSULTA". Lo mismo me pasa cuando al subir alguna imagen nueva intento colocarla en su respectivo album.
No entiendo que puede haber pasado y como solucionarlo.
Necesito que alguien que entienda mas que yo me pueda dar una mano. Gracias!!!

Mi galeria: www.ferdente.com/photos

jmatute

Hola,

A priori me huele a que no has restaurado correctamente el backup de la base de datos (de los archivos php parece que sí), o que tenías algún plugin que ahora se te ha quedado inactivo. Ese tipo de errores suele venir de columnas que aparecen/desaparecen.

Actualiza a la 1.4.27 que es la última de las 1.4.x mientras arreglas tus problemas con el tema. Y activa el modo de depuración y adjunta la salida, a ver qué dice.

Si el problema con el tema no te permitiera activarlo de forma habitual aquí tienes un tutorial para hacerlo por phpmyadmin

Saludos,

pau_cg

Hola!
Hice lo que me indicaste y me sigue arrojando el mismo error.
Te copio la informacion que me arrojo el debug

USER:
------------------
Array
(
    [ID] => 222be0dcb6e90a4e49ac60e90a34d9d1
    [am] => 1
    [lang] => spanish
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => paly
    [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 cpg14x_filetypes; (0.001s)
        [1] => select * from cpg14x_plugins order by priority asc; (0s)
        [2] => delete from `ferdente_galeria`.cpg14x_sessions where time<1290377665 and remember=0; (0s)
        [3] => delete from `ferdente_galeria`.cpg14x_sessions where time<1289171665; (0s)
        [4] => select user_id from `ferdente_galeria`.cpg14x_sessions where session_id = 'f5edd4a2ce444314205d4017bcedec34' (0s)
        [5] => select user_id as id, user_password as password from `ferdente_galeria`.cpg14x_users where user_id=1 (0s)
        [6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.user_group+100 AS group_id FROM `ferdente_galeria`.cpg14x_users AS u INNER JOIN `ferdente_galeria`.cpg14x_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
        [7] => SELECT user_group_list FROM `ferdente_galeria`.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) (0s)
        [9] => SELECT group_name FROM  cpg14x_usergroups WHERE group_id= 1 (0s)
        [10] => update `ferdente_galeria`.cpg14x_sessions set time='1290381265' where session_id = 'f5edd4a2ce444314205d4017bcedec34' (0s)
        [11] => SELECT user_favpics FROM cpg14x_favpics WHERE user_id = 1 (0s)
        [12] => DELETE FROM cpg14x_banned WHERE expiry < '2010-11-21 20:14:25' (0s)
        [13] => SELECT * FROM cpg14x_banned WHERE (ip_addr='190.51.99.170' OR ip_addr='190.51.99.170' OR user_id=1) AND brute_force=0 (0s)
        [14] => SELECT cid, name, description, thumb FROM cpg14x_categories WHERE parent = ''  ORDER BY pos (0.001s)
        [15] => SELECT aid FROM cpg14x_albums as a WHERE category>=10000 (0s)
        [16] => SELECT count(*) FROM cpg14x_pictures as p, cpg14x_albums as a WHERE p.aid = a.aid AND approved='YES' AND category >= 10000 (0s)
        [17] => SELECT aid FROM cpg14x_albums WHERE category = 17 (0s)
        [18] => SELECT count(*) FROM cpg14x_pictures as p, cpg14x_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 17 (0s)
        [19] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg14x_pictures WHERE pid='11561' (0s)
        [20] => SELECT aid FROM cpg14x_albums WHERE category = 18 (0s)
        [21] => SELECT count(*) FROM cpg14x_pictures as p, cpg14x_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 18 (0s)
        [22] => SELECT aid FROM cpg14x_albums WHERE category = 19 (0s)
        [23] => SELECT count(*) FROM cpg14x_pictures as p, cpg14x_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 19 (0s)
        [24] => SELECT aid FROM cpg14x_albums WHERE category = 82 (0s)
        [25] => SELECT count(*) FROM cpg14x_pictures as p, cpg14x_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 82 (0s)
        [26] => SELECT aid FROM cpg14x_albums WHERE category = 9 (0s)
        [27] => SELECT count(*) FROM cpg14x_pictures as p, cpg14x_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 9 (0s)
        [28] => SELECT aid FROM cpg14x_albums WHERE category = 5 (0s)
        [29] => SELECT count(*) FROM cpg14x_pictures as p, cpg14x_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 5 (0s)
        [30] => SELECT aid FROM cpg14x_albums WHERE category = 2 (0s)
        [31] => SELECT count(*) FROM cpg14x_pictures as p, cpg14x_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 2 (0s)
        [32] => SELECT filepath, filename, url_prefix, pwidth, pheight FROM cpg14x_pictures WHERE pid='11560' (0s)
        [33] => SELECT aid FROM cpg14x_albums WHERE category = 34 (0s)
        [34] => SELECT count(*) FROM cpg14x_pictures as p, cpg14x_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 34 (0s)
        [35] => SELECT aid FROM cpg14x_albums WHERE category = 44 (0s)
        [36] => SELECT count(*) FROM cpg14x_pictures as p, cpg14x_albums as a WHERE p.aid = a.aid AND approved='YES' AND category = 44 (0s)
        [37] => SELECT aid FROM cpg14x_albums as a WHERE category = '0' (0s)
        [38] => SELECT count(*) FROM cpg14x_albums as a WHERE 1 (0s)
        [39] => SELECT count(*) FROM cpg14x_pictures as p LEFT JOIN cpg14x_albums as a ON a.aid=p.aid WHERE 1 AND approved='YES' (0s)
        [40] => SELECT count(*) FROM cpg14x_comments as c LEFT JOIN cpg14x_pictures as p ON c.pid=p.pid LEFT JOIN cpg14x_albums as a ON a.aid=p.aid WHERE 1 (0s)
        [41] => SELECT count(*) FROM cpg14x_categories WHERE 1 (0s)
        [42] => SELECT sum(hits) FROM cpg14x_pictures as p LEFT JOIN cpg14x_albums as a ON p.aid=a.aid WHERE 1 (0s)
        [43] => SELECT COUNT(*) FROM cpg14x_pictures WHERE approved = 'NO' (0s)
        [44] => SELECT COUNT(*) from cpg14x_pictures WHERE approved = 'YES'  (0s)
        [45] => SELECT * FROM cpg14x_pictures WHERE approved = 'YES'  ORDER BY pid DESC  LIMIT 0 ,5 (0.001s)
        [46] => SELECT count(*) FROM cpg14x_albums as a WHERE category = '0' (0s)
        [47] => SELECT count(cpg14x_albums.aid) FROM cpg14x_pictures,cpg14x_albums WHERE cpg14x_pictures.aid = cpg14x_albums.aid AND approved = 'YES'  GROUP  BY cpg14x_pictures.aid (0.013s)
        [48] => SELECT *,cpg14x_albums.title AS title,cpg14x_albums.aid AS aid FROM cpg14x_pictures,cpg14x_albums WHERE cpg14x_pictures.aid = cpg14x_albums.aid AND approved = 'YES'  GROUP BY cpg14x_pictures.aid ORDER BY cpg14x_pictures.ctime DESC  LIMIT 0 ,5 (0.059s)
        [49] => SELECT COUNT(*) from cpg14x_pictures WHERE approved = 'YES' and hits > 0  (0.013s)
        [50] => SELECT *, UNIX_TIMESTAMP(mtime) as mtime FROM cpg14x_pictures WHERE approved = 'YES' and hits > 0  ORDER BY mtime DESC  LIMIT 0 ,5 (0.033s)
    )

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

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

    ==========================
    VERSION INFO :
    ------------------
    PHP version: 5.2.13 - OK
    ------------------
    mySQL version: 5.0.51a
    ------------------
    Coppermine version: 1.4.27(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: 1
    XBM Support: 1
    JIS-mapped Japanese Font Support:

    ==========================
    Module: mysql
    ------------------
    MySQL Supportenabled
    Active Persistent Links 0
    Active Links 1
    Client API version 5.0.81
    MYSQL_MODULE_TYPE external
    MYSQL_SOCKET /var/lib/mysql/mysql.sock
    MYSQL_INCLUDE -I/usr/include/mysql
    MYSQL_LIBS -L/usr/lib64 -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 | 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 | system, shell, exec, system_exec, passthru, popen, proc_open, proc_close, proc_nice, proc_terminate, proc_get_status, escapeshellarg, escapeshellcmd, show_source, shell_exec, phpshell, dl | system, shell, exec, system_exec, passthru, popen, proc_open, proc_close, proc_nice, proc_terminate, proc_get_status, escapeshellarg, escapeshellcmd, show_source, shell_exec, phpshell, dl
    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 | 60 | 60
    upload_max_filesize | 10M | 10M
    post_max_size | 8M | 8M
    ==========================
    Page generated in 0.249 seconds - 51 queries in 0.121 seconds - Album set : ; Meta set: ;

    Gracias!!

pau_cg

Perdon jmatute, me acabo de dar cuenta que al activar el debug, cuando ingreso al album debajo del mensaje "Hubo un error al procesar la consulta", me sale esta informacion:

While executing query "SELECT pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, aid, keywords, title, caption,hits,owner_id,owner_name from cpg14x_pictures WHERE ((aid='310'  ) )   ORDER BY filename ASC  LIMIT 0 ,15" on 0

mySQL error: Unknown column 'owner_name' in 'field list'


Por ahi es eso lo que me estabas pidiendo.
Gracias!

jmatute

Exactamente.

Es un campo que desparece en la 1.5, luego no habías restaurado bien la base de datos.

Inténtalo otra vez.

pau_cg

Volvi a restaurar la base de datos, pero no se soluciono. Aparentemente se daño por algo y ya me estoy dando por vencida.
Hay algo que se pueda hacer para reparar la base de datos?
Yo no entiendo mucho pero segun marca el error "mySQL error: Unknown column 'owner_name' in 'field list'" hay una columna que esta faltando. Eso tiene solucion?

jmatute

Siento decírtelo, no parece que hayas recuperado bien la base de datos.

Puedes crear el campo con , pero no te lo recomiendo:

ALTER TABLE `el_prefijo_que_uses_pictures` ADD `owner_name` VARCHAR( 100 ) NOT NULL DEFAULT 'Desconocido'

Siempre es preferible que te esfuerces en dejar las coas bien como debían estar.

Saludos.