multi forum mode

Started by DenDen60, March 09, 2022, 03:45:37 PM

Previous topic - Next topic

DenDen60

Ok I have done this:

global $db_prefix;
$db_string = str_replace("{$db_prefix}members","user_smf300.smfla_members",$db_string);


and this

global $db_prefix;
$db_string = str_replace("{$db_prefix}members","smf300.smfla_members",$db_string);

But I don't see the members when I check in member list.

I even tried to log in with one of the user of the 1st forum to the 2nd forum, but it did not work.




vbgamer45

Attach your file you are editing.


And note Arantor's on avatars for upload. Issue is attachments table not shared
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

DenDen60

Here it is, You cannot view this attachment.

vbgamer45

Visit member list after uploading the file then check error log.
I want to see what it says for prefix. Added logging.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

DenDen60

Quote from: vbgamer45 on April 30, 2022, 11:41:41 AMVisit member list after uploading the file then check error log.
I want to see what it says for prefix. Added logging.
c09c515b53892b635e03e4be802ce066
  https://www.societalogy.org/EZ/index.php?action=admin;area=logs;sa=errorlog;desc;filter=error_type;value=database
  /home/citize47/public_html/societalogy.org/EZ/Sources/Subs-Db-mysql.php (Line 389)

vbgamer45

Doesn't say anything else.
Try this instead.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

DenDen60

There are 5 errors. (There were 5 prior as well, but they all seemed to be the same. Do you want me to reload the previous version and copy the errors here?) 

Guest
  c09c515b53892b635e03e4be802ce066
  https://www.societalogy.org/EZ/index.php?action=admin;area=logs;sa=errorlog;desc=
  /home/citize47/public_html/societalogy.org/EZ/Sources/Subs-Db-mysql.php (Line 389)
Backtrace information

Type of error: General

Error message Select
Prefix: smfez_ String:
 SELECT mem.*, COALESCE(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type, a.width AS "attachment_width", a.height AS "attachment_height"
 FROM {db_prefix}members AS mem
 LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = {int:id_member})
 WHERE mem.id_member = {int:id_member}
 LIMIT 1

----

admin_Test_1!
  70.53.170.194
  c09c515b53892b635e03e4be802ce066
  https://www.societalogy.org/EZ/index.php?action=admin;area=viewmembers;sa=all;a8a7ba6c=c09c515b53892b635e03e4be802ce066
  /home/citize47/public_html/societalogy.org/EZ/Sources/Subs-Db-mysql.php (Line 389)


Prefix: smfez_ String:
 REPLACE INTO smfez_sessions(`session_id`, `data`, `last_update`)
 VALUES
 ('e111a20387cff357ec6f009df5f241f4', 'a:14:{s:13:\"session_value\";s:32:\"c09c515b53892b635e03e4be802ce066\";s:11:\"session_var\";s:8:\"a8a7ba6c\";s:5:\"token\";a:4:{s:11:\"post-remind\";a:4:{i:0;s:10:\"fac5baf01a\";i:1;s:32:\"ed880e631ca2456ca43cd7cd01acf18e\";i:2;i:1651334026;i:3;s:32:\"13bd277f9736d008fa57006f01c22ffd\";}s:10:\"post-login\";a:4:{i:0;s:9:\"d54c3da02\";i:1;s:32:\"f9d9b7eca20cbd0575067fc61558a349\";i:2;i:1651334039;i:3;s:32:\"638652f4d9aa2db86ef4fff2f8e659dc\";}s:16:\"post-admin-login\";a:4:{i:0;s:11:\"ac04de2ee81\";i:1;s:32:\"896c83553d21cd1bd2b7d5ecfd337eb0\";i:2;i:1651338787;i:3;s:32:\"c30abe731ffc80bbbb8319f805519713\";}s:13:\"post-admin-el\";a:4:{i:0;s:12:\"d6f2c9901574\";i:1;s:32:\"b01beb5a4d478fa71e51527f22c5201d\";i:2;i:1651338789;i:3;s:32:\"222581b911eedcf04e4d68d2cf074863\";}}s:2:\"mc\";a:7:{s:4:\"time\";i:1651334040;s:2:\"id\";i:1;s:2:\"gq\";s:3:\"1=1\";s:2:\"bq\";s:3:\"1=1\";s:2:\"ap\";a:1:{i:0;i:0;}s:2:\"mb\";a:0:{}s:2:\"mq\";s:3:\"0=1\";}s:3:\"ban\";a:5:{s:12:\"last_checked\";i:1651334039;s:9:\"id_member\";i:0;s:2:\"ip\";s:13:\"70.53.170.194\";s:3:\"ip2\";s:13:\"70.53.170.194\";s:5:\"email\";s:0:\"\";}s:8:\"log_time\";i:1651338946;s:17:\"timeOnlineUpdated\";i:1651338946;s:7:\"old_url\";s:119:\"https://www.societalogy.org/EZ/index.php?action=admin;area=viewmembers;sa=all;a8a7ba6c=c09c515b53892b635e03e4be802ce066\";s:10:\"USER_AGENT\";s:78:\"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0\";s:18:\"login_SMFCookie854\";s:173:\"{\"0\":1,\"1\":\"25e84ad2390dae21e7ed5cb183011225ea80bfc651d21ad08d01eabbee15f29b630f0a5c3a6b2b8a69832991cd2ec836805f3fee8930f7ddf154f5b00f8fdbf8\",\"2\":1840550040,\"3\":\"\",\"4\":\"\\/\"}\";s:17:\"id_msg_last_visit\";s:1:\"1\";s:2:\"rc\";a:4:{s:2:\"id\";i:1;s:4:\"time\";i:1651334040;s:7:\"reports\";s:1:\"0\";s:14:\"member_reports\";s:1:\"0\";}s:15:\"unread_messages\";i:0;s:10:\"admin_time\";i:1651338789;}', 1651338946)

----



Prefix: smfez_ String:
 REPLACE INTO smfez_sessions(`session_id`, `data`, `last_update`)
 VALUES
 ('e111a20387cff357ec6f009df5f241f4', 'a:14:{s:13:\"session_value\";s:32:\"c09c515b53892b635e03e4be802ce066\";s:11:\"session_var\";s:8:\"a8a7ba6c\";s:5:\"token\";a:4:{s:11:\"post-remind\";a:4:{i:0;s:10:\"fac5baf01a\";i:1;s:32:\"ed880e631ca2456ca43cd7cd01acf18e\";i:2;i:1651334026;i:3;s:32:\"13bd277f9736d008fa57006f01c22ffd\";}s:10:\"post-login\";a:4:{i:0;s:9:\"d54c3da02\";i:1;s:32:\"f9d9b7eca20cbd0575067fc61558a349\";i:2;i:1651334039;i:3;s:32:\"638652f4d9aa2db86ef4fff2f8e659dc\";}s:16:\"post-admin-login\";a:4:{i:0;s:11:\"ac04de2ee81\";i:1;s:32:\"896c83553d21cd1bd2b7d5ecfd337eb0\";i:2;i:1651338787;i:3;s:32:\"c30abe731ffc80bbbb8319f805519713\";}s:13:\"post-admin-el\";a:4:{i:0;s:12:\"d6f2c9901574\";i:1;s:32:\"b01beb5a4d478fa71e51527f22c5201d\";i:2;i:1651338789;i:3;s:32:\"222581b911eedcf04e4d68d2cf074863\";}}s:2:\"mc\";a:7:{s:4:\"time\";i:1651334040;s:2:\"id\";i:1;s:2:\"gq\";s:3:\"1=1\";s:2:\"bq\";s:3:\"1=1\";s:2:\"ap\";a:1:{i:0;i:0;}s:2:\"mb\";a:0:{}s:2:\"mq\";s:3:\"0=1\";}s:3:\"ban\";a:5:{s:12:\"last_checked\";i:1651334039;s:9:\"id_member\";i:0;s:2:\"ip\";s:13:\"70.53.170.194\";s:3:\"ip2\";s:13:\"70.53.170.194\";s:5:\"email\";s:0:\"\";}s:8:\"log_time\";i:1651338946;s:17:\"timeOnlineUpdated\";i:1651338946;s:7:\"old_url\";s:119:\"https://www.societalogy.org/EZ/index.php?action=admin;area=viewmembers;sa=all;a8a7ba6c=c09c515b53892b635e03e4be802ce066\";s:10:\"USER_AGENT\";s:78:\"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0\";s:18:\"login_SMFCookie854\";s:173:\"{\"0\":1,\"1\":\"25e84ad2390dae21e7ed5cb183011225ea80bfc651d21ad08d01eabbee15f29b630f0a5c3a6b2b8a69832991cd2ec836805f3fee8930f7ddf154f5b00f8fdbf8\",\"2\":1840550040,\"3\":\"\",\"4\":\"\\/\"}\";s:17:\"id_msg_last_visit\";s:1:\"1\";s:2:\"rc\";a:4:{s:2:\"id\";i:1;s:4:\"time\";i:1651334040;s:7:\"reports\";s:1:\"0\";s:14:\"member_reports\";s:1:\"0\";}s:15:\"unread_messages\";i:0;s:10:\"admin_time\";i:1651338789;}', 1651338946)


----

admin_Test_1!
  70.53.170.194
  c09c515b53892b635e03e4be802ce066
  https://www.societalogy.org/EZ/index.php?action=admin;area=viewmembers;sa=all;a8a7ba6c=c09c515b53892b635e03e4be802ce066
  /home/citize47/public_html/societalogy.org/EZ/Sources/Subs-Db-mysql.php (Line 389)
Backtrace information

Type of error: General

Error message Select
Prefix: smfez_ String:
 SELECT id_member, alert_pref, alert_value
 FROM {db_prefix}user_alerts_prefs
 WHERE id_member IN ({array_int:members})
 AND alert_pref IN ({array_string:prefs})

----

admin_Test_1!
  70.53.170.194
  c09c515b53892b635e03e4be802ce066
  https://www.societalogy.org/EZ/index.php?action=admin;area=viewmembers;sa=all;a8a7ba6c=c09c515b53892b635e03e4be802ce066
  /home/citize47/public_html/societalogy.org/EZ/Sources/Subs-Db-mysql.php (Line 389)
Backtrace information

Type of error: General

Error message Select
Prefix: smfez_ String:
 SELECT
 mem.id_member, mem.member_name, mem.real_name, mem.email_address, mem.member_ip, mem.member_ip2, mem.last_login,
 mem.posts, mem.is_activated, mem.date_registered, mem.id_group, mem.additional_groups, mg.group_name
 FROM {db_prefix}members AS mem
 LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = mem.id_group)
 WHERE 1=1
 ORDER BY {raw:sort}
 LIMIT {int:start}, {int:per_page}

----

  admin_Test_1!
  70.53.170.194
  c09c515b53892b635e03e4be802ce066
  https://www.societalogy.org/EZ/index.php?action=admin;area=viewmembers;sa=all;a8a7ba6c=c09c515b53892b635e03e4be802ce066
  /home/citize47/public_html/societalogy.org/EZ/Sources/Subs-Db-mysql.php (Line 389)
Backtrace information

Type of error: General

Error message Select
Prefix: smfez_ String:
 SELECT COUNT(*) AS total_members, is_activated
 FROM {db_prefix}members
 WHERE is_activated != {int:is_activated}
 GROUP BY is_activated



vbgamer45

Ah, I see the replacement didn't happen yet.
Try this file.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

DenDen60

I guet this error message

SELECT command denied to user 'citize47_smf300'@'localhost' for table 'smfla_members'

vbgamer45

You need to give permission in your database for db user citize47_smf300 to the smfla_members table or the database that it is under.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

DenDen60

Hummm! The database user is the same for both databases. I did make sure that the  database user had access to both databases

vbgamer45

It shouldn't have that error message. If not make a new user and put in both settings config.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

DenDen60

The problem is that I have to reinstall the older version of the file, because I have not access to SMF at this time. 

DenDen60

So I reinstall the 1st version you sent me and this time there seems to be only 2 errors instead of 5. (This may be due to the fact that I have given the required permission to the database_user. 

Guest
  c09c515b53892b635e03e4be802ce066
  https://www.societalogy.org/EZ/index.php?action=admin;area=viewmembers;a8a7ba6c=c09c515b53892b635e03e4be802ce066
  /home/citize47/public_html/societalogy.org/EZ/Sources/Load.php (Line 561)
Backtrace information

Type of error: Database

Error message Select
: SELECT command denied to user 'citize47_smf300'@'localhost' for table 'smfla_members'
Guest
  c09c515b53892b635e03e4be802ce066
  https://www.societalogy.org/EZ/index.php?action=admin;area=viewmembers;a8a7ba6c=c09c515b53892b635e03e4be802ce066
  /home/citize47/public_html/societalogy.org/EZ/Sources/Subs-Db-mysql.php (Line 594)
Backtrace information

Type of error: General

Error message Select
8: Trying to access array offset on value of type null

vbgamer45

The first version won't work though since the db_prefix is replaced later on. The latest file is the one that should be used. And will work if the database permissions are set correctly.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

DenDen60

Quote from: vbgamer45 on April 30, 2022, 02:52:58 PMThe first version won't work though since the db_prefix is replaced later on. The latest file is the one that should be used. And will work if the database permissions are set correctly.

OK. I will verify again, but all the boxes were checked, so in theory the database user should have access to both databases. I will do this later today. Thanks for your help.  

DenDen60

OK, I checked to make sure that I had the right DB_Admin Username for both Instances of SMF and I had the right passwords. There is only one DB_Admin Username and only one password. 

I then check to see if the DB_Admin Username has access to all the privileges to both instances and it has. This is actually normal since I use the same DB_Admin Username to install the two instances of SMF.

After I have done all this, I replace Subs-Db-mysql.php with the last version below, but the error message is still there: 


SELECT command denied to user 'citize47_smf300'@'localhost' for table 'smfla_members'

Question, what  does " command denied to user " do ? 

   

vbgamer45

Its actually the "SELECT" statement in mysql.  It allows you to read a database table.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

DenDen60

I need someone to develop a multi-forum mod. Anyone interested. I do have access to a small budget for this.  

the member profile would be the same for all forums and include a few fields including country, state and city, which comes from https://simplemaps.com/data/world-cities.

Advertisement: