Hello, About 10 days ago I installed SMF on my domain http://3d-wip.org, after a lot of hard work I have now a version with a layout that eventually fits to my taste. I had a few problems during these days but now they are solved and the Forum works smoothly.
today (yesterday because I didn't sleep this night) I installed Coppermine, it worked, I worked a lot and at the end I had a layout compatible to the one of my Forum. Ok, forum and gallery uses the same database. I'm ready to make the bridge....I changed the 2 files to reflect my installation, I uploaded them and...all seems to work fine. I log in with the admin forum password, and I am back on the gallery...but when I go to "groups", I have a really really sad response: "There was an error while processing a database query."
I include here the log. During the last 3 hours I did some research in this forum and in SimpleMachines' one. Nothing useful to me.
I don't know....maybe I touched something on the Forum, or maybe it's some mod...I don't know....
Any help will be taken like water in a desert, thank you.
<EDIT>: I'm including here the table .3dwip_membergroups, so you can see better:
-- Table structure for table `3dwip_membergroups`
--
DROP TABLE IF EXISTS 3dwip_membergroups;
CREATE TABLE 3dwip_membergroups (
ID_GROUP smallint(5) unsigned NOT NULL auto_increment,
groupName varchar(80) NOT NULL default '',
onlineColor varchar(20) NOT NULL default '',
minPosts mediumint(9) NOT NULL default '-1',
maxMessages smallint(5) unsigned NOT NULL default '0',
stars tinytext NOT NULL,
PRIMARY KEY (ID_GROUP),
KEY minPosts (minPosts)
) TYPE=MyISAM;
--
-- Dumping data for table `3dwip_membergroups`
--
INSERT INTO 3dwip_membergroups (ID_GROUP, groupName, onlineColor, minPosts, maxMessages, stars) VALUES (1,'Administrator','#FF0000',-1,0,'5#staradmin.gif');
INSERT INTO 3dwip_membergroups (ID_GROUP, groupName, onlineColor, minPosts, maxMessages, stars) VALUES (2,'Global Moderator','#FF7878',-1,0,'4#stargmod.gif');
INSERT INTO 3dwip_membergroups (ID_GROUP, groupName, onlineColor, minPosts, maxMessages, stars) VALUES (3,'Moderator','#FCFF19',-1,0,'4#starmod.gif');
INSERT INTO 3dwip_membergroups (ID_GROUP, groupName, onlineColor, minPosts, maxMessages, stars) VALUES (4,'New','',0,0,'1#star_new.gif');
INSERT INTO 3dwip_membergroups (ID_GROUP, groupName, onlineColor, minPosts, maxMessages, stars) VALUES (5,'Started','',50,0,'2#star_started.gif');
INSERT INTO 3dwip_membergroups (ID_GROUP, groupName, onlineColor, minPosts, maxMessages, stars) VALUES (6,'Regular','#C1FDC4',100,0,'3#star_regular.gif');
INSERT INTO 3dwip_membergroups (ID_GROUP, groupName, onlineColor, minPosts, maxMessages, stars) VALUES (7,'Advanced','#8AFB8F',250,0,'4#star_advanced.gif');
INSERT INTO 3dwip_membergroups (ID_GROUP, groupName, onlineColor, minPosts, maxMessages, stars) VALUES (8,'Hyper','#19FF24',500,0,'5#star_addicted.gif');
</EDIT>
<EDIT NUMBER 2> if this is the code inside the bridge file...I don't see the error...:
function udb_synchronize_groups()
{
global $CONFIG, $UDB_DB_NAME_PREFIX, $UDB_DB_LINK_ID;
$result = db_query("SELECT ID_GROUP as usergroupid, groupName as title FROM " . $UDB_DB_NAME_PREFIX . SMF_TABLE_PREFIX . SMF_GROUP_TABLE , $UDB_DB_LINK_ID);
while ($row = mysql_fetch_array($result)) {
$SMF_groups[$row['usergroupid']] = $row['title'];
}
</ EDIT NUMBER 2>
log:
There was an error while processing a database query.
While executing query "SELECT ID_GROUP as usergroupid, groupName as title FROM
`thrdwipo_3dwip`.3dwip_membergroups" 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 '.3dwip_membergroups' at line
1
File: /home/thrdwipo/public_html/2D-3D-gallery/include/functions.inc.php - Line: 105
USER:
------------------
Array
(
[ID] => 22f77cc300b68ff044d7825e563de9da
[am] => 1
)
==========================
USER DATA:
------------------
Array
(
[disk_max] => 0
[disk_min] => 0
[can_rate_pictures] => 1
[can_send_ecards] => 1
[ufc_max] => 3
[ufc_min] => 0
[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
[groups] => Array
(
- => 1
[1] => 4
)
)
==========================
Queries:
------------------
Array
(
- => SELECT extension, mime, content FROM cpg132_filetypes;
[1] =>
SELECT variable, value
FROM 3dwip_settings
[2] =>
SELECT mem.*, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH
FROM 3dwip_members AS mem
LEFT JOIN 3dwip_attachments AS a ON (a.ID_MEMBER = 1)
WHERE mem.ID_MEMBER = 1
LIMIT 1
[3] => 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
cpg132_usergroups WHERE group_id in (1,4)
[4] => SELECT group_name FROM cpg132_usergroups WHERE group_id= 1
[5] => DELETE FROM cpg132_banned WHERE expiry < 1108876986
[6] => SELECT * FROM cpg132_banned WHERE ip_addr='62.78.237.109' OR
ip_addr='62.78.237.109' OR user_id=1
[7] => SELECT ID_GROUP as usergroupid, groupName as title FROM
`thrdwipo_3dwip`.3dwip_membergroups
)
==========================
GET :
------------------
Array
(
)
==========================
POST :
------------------
Array
(
)
==========================
VERSION INFO :
------------------
PHP version: 5.0.3 - OK
------------------
mySQL version: 4.0.23-standard
------------------
Coppermine version: 1.3.2
==========================
Module: gd
------------------
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.4
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XPM Support enabled
XBM Support enabled
==========================
Module: mysql
------------------
Active Persistent Links 0
Active Links 1
Client API version 4.0.23
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.1.4
Linked Version 1.1.4
==========================
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/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 | -1 | -1
upload_max_filesize | 2M | 2M
post_max_size | 55M | 55M[/size]
enable debug_mode in coppermine config, then go to groups page once more and post the actual query that fails.
Joachim
Hello GauGau,
thank you for your answer.
i already posted the actual query. See above after the "log:". I'm missing something? the gallery is here:
http://3d-wip.org/2D-3D-gallery/ you can log in with test/test
About the famous problem on logging out....I see it's an unsolved issue...I must look yet at the famous <unknown>'s sfm_api.php. Yesterday a spent a few hours trying to figure out the size of this problem...few time here, few time on SMF's forum, some other time on mambo's one....no sleep last night...I think that now I'm a little bit confuse...
please give me some hints on that syntax error...I didn't touch your code...maybe I miss some config step, mmm. If you need to see what I set up on the bridge file or something else, please ask. Anyway, I'm trying to look somewhere else...should I find a way to solve this, I'll post that here.
:(
ago-stino
Dear GAUGAU, I found by myself the error inside your bridge:
line 561
$UDB_DB_NAME_PREFIX = SMF_DB_NAME ? '`' . SMF_DB_NAME . '`.' : '';
====> ' <====== this is what makes the error. And here above we have 2 of them. I don't know the syntax....
I (not simply) checked the log that I sent to you....and I found the error that was due by the two " ' " that you can see above.
NOW IT WORKS!!!! another night without sleeping but with really good results! :) :) :) :) :) :D :D :D ;D ;D ;D ;D ;D ;D >:( ;D ;D
I wonder: I'm the only one using the bridge for Simple Machines Forum to has fallen before this error?
hmm... i'm having the exact same issue. unfortunately, when i pull out the extra ' i still get an error:
Parse error: parse error, unexpected $ in /home/site/public_html/gallery/bridge/smf.inc.php on line 569
it's not a database error anymore, but still unsure how to fix it.. any thoughts?
It just means you messed up the file. Try again and do it right. Note that the poster is recommending to remove the backtick (`) not the apostrope (').