forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 bridging => Topic started by: forummaker on June 28, 2008, 03:05:40 pm

Title: [Solved]: There was an error while processing a database query?
Post by: forummaker on June 28, 2008, 03:05:40 pm
I have the following issue when trying to bridge coppermine and SMF 1.1.5:
There was an error while processing a database query

Coppermine install: http://www.remedydog.com/coppermine
Forum install: http://www.remedydog.com/forums
Coppermine version: cpg1.4.8
Forum version: SMF 1.1.5
Test user account: joe / joee

BridgeManager settings:
Forum URL:  http://www.remedydog.com/forums
Relative path to your BBS's config file:  ../forums/
Use post-based groups?:  yes
Cookie name/preifx (if applicable)

After bridging smf and coppermine I created an account in the forum to test and see if it would auto login to coppermine. Now I'm getting "There was an error while processing a database query" all over coppermine. Any help would be appreciated. Thanks.
Title: Re: There was an error while processing a database query?
Post by: Nibbler on June 28, 2008, 04:10:04 pm
Enable debug mode.

http://coppermine-gallery.net/tutorial/debug_mode.php
Title: Re: There was an error while processing a database query?
Post by: forummaker on June 28, 2008, 04:55:22 pm
USER:
------------------
Array
(
    [ID] =>
    [am] => 1
    [lang] => english
)

==========================
USER DATA:
------------------
Array
(
    [user_id] =>
    [user_name] =>
    [groups] => Array
        (
            [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] => 0
    [has_admin_access] => 0
    [pub_upl_need_approval] => 1
    [priv_upl_need_approval] => 0
    [group_name] => Registered
    [upload_form_config] => 3
    [group_quota] => 1024
    [can_see_all_albums] => 0
    [group_id] => 2
)

==========================
Queries:
------------------
Array
(
    [e] =>
)

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

==========================
Page generated in 0.236 seconds - 7 queries in 0.006 seconds - Album set : ; Meta set: ;
Title: Re: There was an error while processing a database query?
Post by: forummaker on July 01, 2008, 03:52:56 am
Sorry, but now I have a different problem, and still get the same error. Now when a guest clicks on an image from my homepage it takes them to my coppermine site, but it displays the error.  It works fine if someone is logged into the site and clicks the image. I thought I set all the proper permissions in the control panel, not sure what I missed. Thanks in advance.
Title: Re: There was an error while processing a database query?
Post by: Nibbler on July 01, 2008, 03:57:04 am
You need to enable debug mode. Can't help you otherwise.
Title: Re: There was an error while processing a database query?
Post by: forummaker on July 01, 2008, 04:12:41 am
USER:
------------------
Array
(
    [ID] =>
    [am] => 1
    [lang] => english
    [liv] => Array
        (
           
        )

)

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

    [disk_max] => 6000
    [disk_min] => 6000
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 3
    [ufc_min] => 3
    [custom_user_upload] => 0
    [num_file_upload] => 3
    [num_URI_upload] => 1
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 0
    [has_admin_access] => 0
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Registered
    [upload_form_config] => 3
    [group_quota] => 6000
    [can_see_all_albums] => 0
    [group_id] => 2
)

==========================
Queries:
------------------
Array
(
    [pos] => -4
    [e] =>
    [displayimage_php?pos] => -4
)

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

==========================
Page generated in 0.251 seconds - 8 queries in 0.006 seconds - Album set : ; Meta set: ;
Title: Re: There was an error while processing a database query?
Post by: forummaker on July 01, 2008, 04:16:02 am
While executing query "SELECT * FROM cpg14x_banned WHERE (ip_addr='' OR ip_addr='' OR user_id=) AND brute_force=0" on 0

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 ') AND brute_force=0' at line 1
Title: Re: There was an error while processing a database query?
Post by: Nibbler on July 01, 2008, 04:48:42 am
Edit include/init.inc.php

find

Code: [Select]
$user_id = USER_ID;
change to

Code: [Select]
$user_id = USER_ID ? USER_ID : 0;
Title: Re: There was an error while processing a database query?
Post by: forummaker on July 03, 2008, 12:41:26 am
Thanks! Worked great. I'm getting something else. I'm getting these errors in my smf error logs. Any ideas?

Here are two error logs:

"2: mysql_query() [<a href='function.mysql-query'>function.mysql-query[/url]]: A link to the server could not be established
File: /home/content/j/u/m/html/forums/Themes/default/TPortal.template.php (tp_below sub template - eval?)
Line: 176:"

"8: Undefined property: cpm::$ AND ( p.filename like '%.jpg' OR p.filename like '%.JPG' OR
File: /home/content/j/u/m/html/coppermine/cpmfetch/cpmfetch_dao.php
Line: 182"
Thank you very much for the help.
Title: Re: There was an error while processing a database query?
Post by: Nibbler on July 03, 2008, 01:18:33 am
I don't think that's related. I reported the second issue at http://forum.coppermine-gallery.net/index.php/topic,53647.0.html however.