Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
I apologize if this is somewhere - I couldn't find it in the forum nor in the documentation.

I had originally set my forum up to use the root password, since it was the only thing using MySQL and it was small. Now it's large smile. I would like to change this to using its own username.

I created a user in MySQL Workbench. I gave it all access to my UBB schema. I then put that user information into the control panel.

When I do, I can see messages, so the connection is made and active. However, it claims there are no forums on the main forum page. When I try to go to a specific post via a URL, it says access denied.

Any thoughts?

Here's what I currently have.

[Linked Image from lisashea.com]


Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Jun 2006
Posts: 16,532
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,532
Likes: 150
I have a user created with usage rights to the ubb database, then all rights to the tables within...
Attachments
db.gif


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
Gizmo -

It's odd. I definitely have my new ubblisa user having full rights to the ubb database and tables. There are four logons associated with ubblisa - for 127.0.0.1, ::1, localhost, and the server name. I have found if I take "SUPER" off 127.0.0.1 I get the forums not found error.

So this works -

[Linked Image from lisashea.com]

But if I unclick JUST the SUPER rights on that entry (and remember, the database itself is granted full rights in a separate screen) - I get this -

[Linked Image from lisashea.com]

Put super back on, voila, forums are back.

Without SUPER I can still get to certain areas like messages, so the connection is still there and working.


Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
More details. I went at it from the angle of "what special rights does SUPER grant that this might need".

I then turned on full logs and looked at test runs of looking at the main forum listing with super on vs super off.

I'll note first that without super I *do* get the SET NAMES command that I want. So this is a worthwhile quest, to get a non-SUPER account to use the tables so I can then use the SET NAMES to get my UTF8.

There are TWO differences in the log files.

First: At the end of the healthy run, ubbt_ONLINE gets updated. In the no-Super-access run, that statement is completely absent. I have tested with PHP and the ubblisa account can run that statement. So it's not an access issue.

Second: Before that happens, there is a whole block of SELECTS missing, where it selects from each forum ID and gets the count of posts, sum of posts, and so on. So in the non-SUPER run it goes right from getting the forum title, desc. etc. - skipping over the forum-by-forum queries - and lands right on getting the category title, ID, etc.

So this makes sense. This is why it says there aren't any forums. It never did the selects to get them.

Now to figure out why smile.

Last edited by BellaOnline; 12/28/2012 5:43 AM.

Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
OK, if I stop using the "SET NAMES" command, everything works perfectly with only regular rights. So I can have my ubblisa account work just like Gizmo does, as long as I don't try to use SET NAMES. Unfortunately a key purpose of this project was to be able to use SET NAMES smile.

When I run just the line in question with SET NAMES, in my test script, it works fine -

Code
SELECT	COUNT(p.POST_ID) AS POSTS, SUM(p.POST_IS_TOPIC) AS TOPICS, t.FORUM_ID
FROM	ubbt_POSTS as p,
	ubbt_TOPICS as t
	WHERE	(t.TOPIC_ID = p.TOPIC_ID) AND p.POST_IS_APPROVED = 1
	AND (0
	OR (t.FORUM_ID = 10 AND p.POST_POSTED_TIME > 1328522142)) GROUP BY t.FORUM_ID

So for some reason this code won't run in the live UBB system - it never shows up in the SQL logs. Thoughts on why adding SET NAMES UTF8 would interfere with this section of code not executing? The code right before it - getting the online browsing count - does execute. So something happens before it can then get the forum value. And it only jams if SET NAMES is on.


Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
OK I think I found the problem and I definitely need some help here.

It's in the script

Code
select USER_ID,FORUM_PERMISSIONS,SITE_PERMISSIONS,CP_PERMISSIONS
			from ubbt_CACHED_PERMISSIONS
			where USER_ID = 2

Here's what that one of that result looks like -

Code
'a:23:{s:8:\"USE_HTML\";a:25:{i:10;s:1:\"1\";i:11;s:1:\"1\";i:12;s:1:\"1\";i:13;s:1:\"1\";i:14;s:1:\"1\";i:15;s:1:\"1\";i:16;s:1:\"1\";i:17;s:1:\"1\";i:18;s:1:\"1\";i:19;s:1:\"1\";i:20;s:1:\"1\";i:24;s:1:\"1\";i:25;s:1:\"1\";i:26;s:1:\"1\";i:29;s:1:\"1\";i:31;s:1:\"1\";i:32;s:1:\"1\";i:33;s:1:\"1\";s:11:\"33©_forum=0\";s:1:\"1\";i:35;s:1:\"1\";i:36;s:1:\"1\";i:5;s:1:\"1\";i:6;s:1:\"1\";i:7;s:1:\"1\";i:8;s:1:\"1\";}

Note the copyright symbol in the middle of 33(c)_forum=0

Is that really what should be there? It's apparently that mark that is screwing up things once I try to use UTF8 as my language, since it's having problems with it.

Last edited by BellaOnline; 12/30/2012 6:31 AM.

Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
Digging down to the root of this. My ubbt_forum_perimissions table has several rows that look like this:

Code
'1', '33©_forum=0', '1', '1', '0', '0', '1', '0', '0', '1', '1', '0', '1', '1', '0', '0', '0', '360', '60', '1', '1', '1', '1', '1', '1', '0', '1', '0', '1'

I haven't changed forum permissions in ages. Note this row is IN ADDITION to a row for actual forum 33. Forum 33 used to have a slash and & in its title and such. Could these have caused issues for UBB a while back and this has been a historic problem in this table?

In addition to this row there is also this non-numeric row -

Code
'1', 'New Forum Template', '1', '1', '0', '0', '1', '0', '0', '1', '1', '0', '1', '1', '0', '0', '1', '16777000', '16777000', '1', '1', '1', '1', '1', '1', '0', '1', '0', '1'

Are both of these rows "bad rows" lingering from old activities?


Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
Well, I gave in and simply deleted the rows in ubbt_forum_permissions that had the 33(c)_forum=0 as the forum ID.

Voila! I can now "set names" without any error. I now see curly quotes in my forum posts. All of this grief because my forum_permissions table had garbage in it. How did that 33(c)_forum=0 end up in the table?

Hopefully this helps other people who had this issue.

My remaining issue is that the post with the curly quotes will not show UBB properly. You can see this with the top entry here -

http://www.wineintro.com/forum/ubbthreads.php/topics/425926/1

Will dig into that next. Does that have to do with the htmlspecialchars change we made earlier?


Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
Well, I can edit those posts, save them, and they show up perfectly. So that is a good enough solution for me. This now appears to be all set.


Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
After server reboot
by Morgan - 09/02/2026 8:27 AM
8.0.1 Patch Changelog Discussion
by isaac - 11/26/2025 1:34 PM
Who's Online Now
0 members (), 296 guests, and 109 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)