Search yields "There was an error while processing a database query." Search yields "There was an error while processing a database query."
 

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]

Main Menu

Search yields "There was an error while processing a database query."

Started by anewday, December 17, 2012, 06:55:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

anewday

Board url: http://gallery.celinedionforum.com
Running on version 1.5.20, used the bridge from http://forum.coppermine-gallery.net/index.php/topic,66144.0.html and "use bridge app custom groups" is enabled.

When I tried to search, it yields a "Critical Error There was an error while processing a database query." Below is the debug info.

########################

While executing query 'SELECT COUNT(*) FROM cpg11d_pictures AS p
            LEFT JOIN `celine_forum`.ibf_members AS u ON p.owner_id = u.member_id
            WHERE ((title LIKE '%lanvin%' OR caption LIKE '%lanvin%' OR keywords LIKE '%lanvin%' OR filename LIKE '%lanvin%')) AND approved = 'YES' ' in include/search.inc.php on line 266
mySQL error: SELECT command denied to user 'celine_cop1'@'localhost' for table 'ibf_members'

File: /home/celine/public_html/forum/gallery/include/functions.inc.php - Line: 270

Notices
/include/search.inc.php
Notice line 34: Undefined index: owner_name
/include/logger.inc.php
Warning line 62: fopen(logs/database.log.php) [function.fopen]: failed to open stream: Permission denied
Warning line 63: fwrite(): supplied argument is not a valid stream resource
Warning line 64: fwrite(): supplied argument is not a valid stream resource
Warning line 65: fclose(): supplied argument is not a valid stream resource
########################

Let me know if I should also post he Debug Info. Thanks in advance.

Jeff Bailey

Does it work fine unbridged?

Please turn on debug mode. This error is most likely caused by MySQL permissions.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

anewday

Works on unbridged mode. Forgot to mention that it was upgraded from 1.4 to 1.5. Search worked fine in bridged mode with Invision board 2.3 before the upgrade. Here's the output of Debug Info:


USER:
------------------
Array
(
    [ID] => *intentionally removed*
    [am] => 1
    [liv] => Array
        (
        )

    [search] => Array
        (
            [params] => Array
                (
                    [keywords] => on
                    [title] => on
                    [caption] => on
                    [filename] => on
                    [type] => AND
                )

            [search] => lanvin
        )

    [lang] => english
)

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

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

)

==========================
Queries:
------------------
Array
(
    [0] => SELECT name, value FROM cpg11d_config [include/init.inc.php:179] (1 ms)
    [1] => SELECT * FROM cpg11d_plugins ORDER BY priority [include/plugin_api.inc.php:52] (0 ms)
    [2] => SELECT name, value FROM cpg11d_bridge [include/functions.inc.php:4442] (0 ms)
    [3] => SELECT u.member_id AS id, u.members_display_name AS username, member_login_key AS password, u.member_group_id AS group_id FROM `celine_forum`.ibf_members AS u LEFT JOIN `celine_forum`.ibf_groups AS g ON u.member_group_id=g.g_id WHERE u.member_id='1' [bridge/udb_base.inc.php:70] (0 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 cpg11d_usergroups WHERE group_id in (104) [bridge/udb_base.inc.php:321] (0 ms)
    [5] => SELECT group_name FROM cpg11d_usergroups WHERE group_id= 104 [bridge/udb_base.inc.php:325] (0 ms)
    [6] => SELECT COUNT(*) FROM cpg11d_categorymap WHERE group_id in (104) [bridge/udb_base.inc.php:338] (0 ms)
    [7] => SELECT lang_id FROM cpg11d_languages WHERE enabled='YES' [include/init.inc.php:327] (0 ms)
    [8] => SELECT user_favpics FROM cpg11d_favpics WHERE user_id = 1 [include/init.inc.php:385] (0 ms)
    [9] => DELETE FROM cpg11d_banned WHERE expiry < '2012-12-17 22:39:23' [include/init.inc.php:441] (0 ms)
    [10] => SELECT null FROM cpg11d_banned WHERE (user_id=1 OR '108.54.244.242' LIKE ip_addr ) AND brute_force=0 LIMIT 1 [include/init.inc.php:457] (0 ms)
    [11] => SELECT COUNT(*) FROM cpg11d_pictures WHERE approved = 'NO' [include/functions.inc.php:2439] (0 ms)
    [12] => SELECT lang_id, abbr FROM cpg11d_languages WHERE available='YES' AND enabled='YES' [include/themes.inc.php:2316] (0 ms)
    [13] => DELETE FROM cpg11d_temp_messages WHERE time < 1355801963 [include/functions.inc.php:4948] (0 ms)
    [14] => SELECT aid, title, description FROM `cpg11d_albums` AS p WHERE (`title`  LIKE '%lanvin%')  [include/search.inc.php:121] (0 ms)
    [15] => SELECT cid, name FROM `cpg11d_categories` WHERE (`name`  LIKE '%lanvin%') [include/search.inc.php:166] (0 ms)
    [16] => SELECT COUNT(*) FROM cpg11d_pictures AS p
            LEFT JOIN `celine_forum`.ibf_members AS u ON p.owner_id = u.member_id
            WHERE ((keywords LIKE '%lanvin%' OR title LIKE '%lanvin%' OR caption LIKE '%lanvin%' OR filename LIKE '%lanvin%')) AND approved = 'YES'  [include/search.inc.php:266] (0 ms)
    [17] => DELETE FROM cpg11d_temp_messages WHERE time < 1355801963 [include/functions.inc.php:4948] (0 ms)
)

==========================
GET :
------------------
Array
(
    [search] => lanvin
    [submit] => search
    [album] => search
    [title] => on
    [newer_than] =>
    [caption] => on
    [older_than] =>
    [keywords] => on
    [filename] => on
    [type] => AND
    [album_title] => on
    [category_title] => on
)

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

==========================
COOKIE :
------------------
Array
(
    [tapatalk_redirect4] => false
    [__qca] => *intentionally removed*
    [forumhide_sidebar] => 0
    [forumtoggleOpenCats] => ,4,85,
    [forumtoggleCats] => ,17,26,20,29,57,
    [forumtoggleSBlocks] => ,,
    [forummember_id] => 1
    [forumrteStatus] => std
    [forumpass_hash] => *intentionally removed*
    [__utma] => 32609068.1553299284.1353555719.1355800042.1355803149.77
    [__utmb] => 32609068.41.10.1355803149
    [__utmz] => 32609068.1353555719.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
    [cpg140_data] => *intentionally removed*
)

==========================
VERSION INFO :
------------------
PHP version        5.2.13              OK   
MySQL version      4.1.22-standard-log OK   
Coppermine version 1.5.20              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                         
JPG Support                      1                         
PNG Support                      1                         
WBMP Support                     1                         
XPM Support                                                 
XBM Support                      1                         
JIS-mapped Japanese Font Support                           

==========================
Key config settings
------------------
site_url             http://www.celinedionforum.com/gallery/     
charset              utf-8                                       
allow_private_albums 1                                           
cookie_name          cpg140                                     
cookie_path          /                                           
impath               /usr/bin/                                   
lang                 english                                     
main_page_layout     breadcrumb/catlist/alblist/random,2/lastup,2
silly_safe_mode      0                                           
smtp_host                                                       
theme                water_drop                                 
thumb_method         im                                         

==========================
Plugins
------------------

==========================
Server restrictions
------------------
safe_mode                                                                               
safe_mode_exec_dir                                                                       
safe_mode_gid                                                                           
safe_mode_include_dir                                                                   
sql.safe_mode                                                                           
disable_functions        dl,system,passthru,shell_exec                                   
file_uploads             1                                                               
include_path             .:/usr/lib/php:/usr/local/lib/php:/usr/local/lsws/lsphp5/lib/php
open_basedir                                                                             
allow_url_fopen          1                                                               
max_execution_time       300                                                             
max_input_time           300                                                             
upload_max_filesize      50M                                                             
post_max_size            60M                                                             
memory_limit             164M                                                           
suhosin.post.max_vars                                                                   
suhosin.request.max_vars                                                                 


==========================
Page (performance)
------------------
Parameter        Current    Peak     
Memory usage     389.69 KiB 460.21 KiB
Page generation  9 ms       9 ms     
Page query time  1 ms       1 ms     
Page query count 18         18       


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

               

Αndré

QuotemySQL error: SELECT command denied to user 'celine_cop1'@'localhost' for table 'ibf_members'

It's a MySQL permission error, which has already been fixed in our SVN repository. See http://forum.coppermine-gallery.net/index.php/topic,75712.msg364913.html#msg364913


Αndré