I upgrade few days ago from coppermine 1.4x to 1.5.3, all the upgrade went well and i install the new CPG version without problems. But today i been testing my gallery and see this mySQL error:
Critical error
There was an error while processing a database query.
While executing query 'SELECT COUNT(*) FROM cpg14x_pictures AS p
INNER JOIN cpg14x_albums AS r ON r.aid = p.aid
INNER JOIN cpg14x_comments AS c ON c.pid = p.pid
WHERE (1)
AND approved = 'YES'
AND approval = 'YES'
AND msg_id > ' in include/functions.inc.php on line 2069
mySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7
File: /home/abroadbg/public_html/include/functions.inc.php - Line: 233
After 117 posts I am sure you should understand the need to post a link.
When do you see this error? What are you doing at the time?
I see this error when i click on last comments link.
Here is one of my last testing comments and the error:
http://abroadbg.com/displayimage.php?album=lastcom&cat=-1&pid=1342
http://www.abroadbg.com
user: test
password: 123654
The last comments link should look like displayimage.php?album=lastcom&cat=0&pid=15559&msg_id=24549&page=1#comment24549. Please verify that you have replaced all core files with the new ones from the Coppermine 1.5.3 package.
If it still doesn't work, please post debug output.
Thank you for the reply André. I'm sure i replace all the core files with the new from coppermine 1.5.3 package. I read the CPG 1.5 Documentation twice before start, and during the upgrade process once more.
My debug output is:
USER:
------------------
Array
(
[ID] => 6636538a3624db6d034782dc90d19c7c
[am] => 1
[lang] => english
[liv] => Array
(
[0] => 2
)
[search] => Array
(
[search] => noi
[album] => search
[title] => on
[newer_than] =>
[caption] => on
[older_than] =>
[keywords] => on
[type] => AND
[params] => Array
(
[title] => on
[caption] => on
[keywords] => on
)
)
[upload_method] => html_single
[sort] => dd
[uid] => 3
)
==========================
USER DATA:
------------------
Array
(
[user_id] => 1
[user_name] => admin
[groups] => Array
(
[0] => 1
)
[disk_max] => 0
[disk_min] => 0
[can_rate_pictures] => 1
[can_send_ecards] => 1
[can_post_comments] => 1
[can_upload_pictures] => 1
[can_create_albums] => 1
[has_admin_access] => 1
[access_level] => 3
[pub_upl_need_approval] => 0
[priv_upl_need_approval] => 0
[group_name] => Administrators
[group_quota] => 0
[can_see_all_albums] => 1
[group_id] => 1
[allowed_albums] => Array
(
)
)
==========================
Queries:
------------------
Array
(
[0] => SELECT name, value FROM cpg14x_config [include/init.inc.php:177] (0 ms)
[1] => SELECT * FROM cpg14x_plugins ORDER BY priority [include/plugin_api.inc.php:54] (0 ms)
[2] => SELECT user_id, time FROM `abroadbg_gallery`.cpg14x_sessions WHERE session_id = '4f9e97b1f69b3c54f27e970a3c279b01' [bridge/coppermine.inc.php:258] (0 ms)
[3] => SELECT user_id, user_password FROM `abroadbg_gallery`.cpg14x_users WHERE user_id = 1 [bridge/coppermine.inc.php:270] (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 `abroadbg_gallery`.cpg14x_users AS u LEFT JOIN `abroadbg_gallery`.cpg14x_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' [bridge/udb_base.inc.php:72] (0 ms)
[5] => SELECT user_group_list FROM `abroadbg_gallery`.cpg14x_users AS u WHERE user_id='1' AND user_group_list <> '' [bridge/coppermine.inc.php:200] (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 cpg14x_usergroups WHERE group_id in (1) [bridge/udb_base.inc.php:323] (0 ms)
[7] => SELECT group_name FROM cpg14x_usergroups WHERE group_id= 1 [bridge/udb_base.inc.php:327] (0 ms)
[8] => SELECT lang_id FROM cpg14x_languages WHERE enabled='YES' [include/init.inc.php:318] (0 ms)
[9] => SELECT user_favpics FROM cpg14x_favpics WHERE user_id = 1 [include/init.inc.php:376] (0 ms)
[10] => DELETE FROM cpg14x_mod_online WHERE last_action < NOW() - INTERVAL 10 MINUTE [plugins/onlinestats/codebase.php:125] (0 ms)
[11] => REPLACE INTO cpg14x_mod_online (user_id, user_name, user_ip, last_action) VALUES ('1', 'admin', '88.185.120.111', NOW()) [plugins/onlinestats/codebase.php:130] (0 ms)
[12] => DELETE FROM cpg14x_banned WHERE expiry < '2010-04-24 23:22:02' [include/init.inc.php:432] (0 ms)
[13] => SELECT null FROM cpg14x_banned WHERE (user_id=1 OR '88.185.120.111' LIKE ip_addr ) AND brute_force=0 LIMIT 1 [include/init.inc.php:448] (0 ms)
[14] => SELECT category, title, aid, keyword, description, alb_password_hint FROM cpg14x_albums WHERE aid='1' [displayimage.php:310] (0 ms)
[15] => SELECT COUNT(*) FROM cpg14x_pictures AS p
INNER JOIN cpg14x_albums AS r ON r.aid = p.aid
INNER JOIN cpg14x_comments AS c ON c.pid = p.pid
WHERE (r.aid = 1 OR keywords like '%admos%')
AND approved = 'YES'
AND approval = 'YES'
AND msg_id > [include/functions.inc.php:2069] (0 ms)
[16] => SELECT COUNT(*) FROM cpg14x_pictures WHERE approved = 'NO' [include/functions.inc.php:2366] (0 ms)
[17] => SELECT lang_id, abbr FROM cpg14x_languages WHERE available='YES' AND enabled='YES' [include/themes.inc.php:2314] (0 ms)
[18] => DELETE FROM cpg14x_temp_messages WHERE time < 1272136922 [include/functions.inc.php:4867] (0 ms)
)
==========================
GET :
------------------
Array
(
[album] => lastcom
[cat] => -1
[pid] => 1342
)
==========================
POST :
------------------
Array
(
)
==========================
COOKIE :
------------------
Array
(
[coppermine_data] => YTo4OntzOjI6IklEIjtzOjMyOiI2NjM2NTM4YTM2MjRkYjZkMDM0NzgyZGM5MGQxOWM3YyI7czoyOiJhbSI7aToxO3M6NDoibGFuZyI7czo3OiJlbmdsaXNoIjtzOjM6ImxpdiI7YToxOntpOjA7czoxOiIyIjt9czo2OiJzZWFyY2giO2E6OTp7czo2OiJzZWFyY2giO3M6Mzoibm9pIjtzOjU6ImFsYnVtIjtzOjY6InNlYXJjaCI7czo1OiJ0aXRsZSI7czoyOiJvbiI7czoxMDoibmV3ZXJfdGhhbiI7czowOiIiO3M6NzoiY2FwdGlvbiI7czoyOiJvbiI7czoxMDoib2xkZXJfdGhhbiI7czowOiIiO3M6ODoia2V5d29yZHMiO3M6Mjoib24iO3M6NDoidHlwZSI7czozOiJBTkQiO3M6NjoicGFyYW1zIjthOjM6e3M6NToidGl0bGUiO3M6Mjoib24iO3M6NzoiY2FwdGlvbiI7czoyOiJvbiI7czo4OiJrZXl3b3JkcyI7czoyOiJvbiI7fX1zOjEzOiJ1cGxvYWRfbWV0aG9kIjtzOjExOiJodG1sX3NpbmdsZSI7czo0OiJzb3J0IjtzOjI6ImRkIjtzOjM6InVpZCI7aTozO30=
[b4e11d0bad6f54a91d0ce01e52d2aeb7] => 7d6a4b273bb4eb56ae3df09067e72524
[meebo-cim] => channel=214¬dark=1&bcookie=2e585c7498b91ae27fe2
[__qca] => P0-1282989145-1270621455701
[cdata] => {\"sc76\":\"1\",\"sc12\":\"1\"}
[meebo-cim-session] => ad-start-time=1272095435590&start-time=1272095435591
[PHPSESSID] => f0c417b894a0c8ef879846d0c7100f5d
[cpsession] => 0CWlk7VoJ_1O_R1YypRo4AB4YFvLQnZH0Kp92Vc1uVmAKnLyUINuDGtaPCs_gkgg
[cprelogin] => no
[logintheme] => cpanel
[picinfo] => block
[cpg_numviews] => 1
)
==========================
SESSION :
------------------
Array
(
)
==========================
VERSION INFO :
------------------
PHP version 5.2.12 OK
MySQL version 5.0.89-community-log OK
Coppermine version 1.5.3 RC
==========================
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
JPG 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://abroadbg.com/
charset utf-8
allow_private_albums 1
cookie_name coppermine
cookie_path /
impath
lang english
main_page_layout lastup/breadcrumb/catlist/alblist/onlinestats
silly_safe_mode 0
smtp_host
theme water_drop
thumb_method im
==========================
Plugins
------------------
Name Link target
Actions page_start
Filters
--------------
Name Who is online?
Actions plugin_install, page_start, plugin_uninstall, plugin_cleanup, plugin_configure
Filters plugin_block
--------------
Name User Gallery Alphabetic Tabbing
Actions
Filters
--------------
Name Remote Videos
Actions plugin_install, plugin_uninstall
Filters html_other_media
--------------
Name Add Meta Description
Actions plugin_install, plugin_uninstall
Filters
--------------
Name File replacer
Actions page_start
Filters file_data
--------------
Name Short URL
Actions page_start, plugin_install, plugin_uninstall, plugin_cleanup
Filters sys_menu
--------------
Name Mirror
Actions plugin_install, plugin_configure, page_start
Filters
--------------
Name BBCode Control
Actions plugin_install, plugin_uninstall, plugin_cleanup
Filters admin_menu, bbcode, theme_add_comment, theme_edit_comment, file_info
--------------
Name Ten Times
Actions page_start
Filters
--------------
Name Panorama Viewer
Actions
Filters html_image_reduced_overlay, html_image_reduced, html_image_overlay, html_image
--------------
Name Add thumbnails to favorites
Actions page_start
Filters thumb_caption_favpics
--------------
Name LightBox NotesFor.net
Actions plugin_install, plugin_uninstall
Filters file_data, page_meta
--------------
Name AJAX reCaptcha
Actions plugin_install, plugin_configure, plugin_uninstall, captcha_comment_validate, captcha_contact_validate
Filters captcha_comment_print, captcha_contact_print, captcha_register_print, captcha_register_validate, page_meta
--------------
Name Mousewheel support for filmstrip
Actions page_start
Filters
--------------
Name Custom thumbnail
Actions page_start
Filters file_data
--------------
==========================
Server restrictions
------------------
safe_mode
safe_mode_exec_dir /usr/local/php/bin
safe_mode_gid 0
safe_mode_include_dir
sql.safe_mode 0
disable_functions
file_uploads 1
include_path .:/usr/lib/php
open_basedir
allow_url_fopen 1
max_execution_time 30
max_input_time 60
upload_max_filesize 12M
post_max_size 8M
memory_limit 128M
suhosin.post.max_vars
suhosin.request.max_vars
==========================
Page (performance)
------------------
Parameter Current Peak
Memory usage 5.76 MiB 7.28 MiB
Page generation 72 ms 72 ms
Page query time 0 ms 0 ms
Page query count 19 19
==========================
You have installed a lot plugins. Please disable the plugin engine for testing and check if the error message still appears. Maybe a plugin causes the error.
Thanks André, the you are right the error is from plugin. The plugin which making the database error is Add thumbnails to favorites (album_fav_boxes): v2.4 Do i need to write now in the plugin topic for this errors ??? http://forum.coppermine-gallery.net/index.php/topic,60278.0.html
Ivo
Quote from: Heroe on April 25, 2010, 11:43:08 AM
Do i need to write now in the plugin topic for this errors ???
Yes, please.