Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jun 2006
Posts: 3,839
Likes: 1
I
Ian
Offline
Carpal Tunnel
Carpal Tunnel
I Offline
Joined: Jun 2006
Posts: 3,839
Likes: 1
Hi,

On my copy of threads nothing from the config.inc.php is being read.

When I view the file within the CP all boxes are blank.

Yet, when I view config.inc.php in a file viewer all the data is there.

As a result, I have no header, footer, new post indicator etc., showing. Nor do I have a post count against the top posters, and the quick reply box is also missing.

The only advantage is that the forums are loading much faster LOL

Any suggestions as to why this has suddenly happened?

I have checked that the file has 777 permissions etc.

Looking at my error log I am seeing....

Code
[ERROR][Sun, May 11 2008 12:05:52 +0100] [] [] Script: /path/to/forums/scripts/postlist.inc.php - Line: 524 
		select 	t1.TOPIC_ID,t1.POST_ID,t2.USER_DISPLAY_NAME,t1.TOPIC_CREATED_TIME,t1.TOPIC_LAST_REPLY_TIME,t1.TOPIC_SUBJECT,
 		t1.TOPIC_STATUS,t1.TOPIC_IS_APPROVED,t1.TOPIC_ICON,t1.TOPIC_VIEWS,t1.TOPIC_REPLIES,t1.TOPIC_TOTAL_RATES,
 		t1.TOPIC_RATING,t3.USER_NAME_COLOR,t2.USER_MEMBERSHIP_LEVEL,t1.USER_ID,t1.TOPIC_IS_STICKY,t1.TOPIC_LAST_POSTER_ID,
 		t1.TOPIC_LAST_POSTER_NAME,t1.TOPIC_LAST_POST_ID,t1.TOPIC_IS_EVENT,t1.TOPIC_HAS_FILE,t1.TOPIC_HAS_POLL,t1.TOPIC_POSTER_NAME,t1.TOPIC_THUMBNAIL,t4.POST_BODY
		from ubbt_TOPICS as t1
		left join ubbt_USERS as t2 on t1.USER_ID = t2.USER_ID
		left join ubbt_USER_PROFILE as t3 on t1.USER_ID = t3.USER_ID
		left join ubbt_POSTS as t4 on t1.POST_ID = t4.POST_ID
		where t1.FORUM_ID = 14
		and t1.TOPIC_IS_STICKY = '0'
		
		AND t1.TOPIC_IS_APPROVED = '1'
		ORDER BY t1.TOPIC_CREATED_TIME desc
		LIMIT 
	 - 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 '' at line 14


and

Code
[ERROR][Sun, May 11 2008 12:05:46 +0100] [] [] Script: /path/to/forums/scripts/showflat.inc.php - Line: 647 
		SELECT	p.POST_ID, u.USER_DISPLAY_NAME, p.POST_POSTED_TIME, p.POST_POSTER_IP,
			p.POST_SUBJECT, p.POST_BODY, p.POST_IS_APPROVED, up.USER_AVATAR, up.USER_TITLE,
			up.USER_CUSTOM_TITLE, up.USER_NAME_COLOR, p.POST_ICON, p.POST_HAS_POLL,
			p.POST_HAS_FILE, p.POST_PARENT_ID, u.USER_MEMBERSHIP_LEVEL, up.USER_SIGNATURE,
			p.POST_LAST_EDITED_TIME, p.POST_LAST_EDIT_REASON, p.POST_LAST_EDITED_BY,
			up.USER_LOCATION, up.USER_TOTAL_POSTS, u.USER_REGISTERED_ON, up.USER_RATING,
			up.USER_AVATAR_WIDTH, up.USER_AVATAR_HEIGHT, u.USER_ID, p.POST_PARENT_USER_ID,
			up.USER_BIRTHDAY, up.USER_PUBLIC_BIRTHDAY, p.POST_ADD_SIGNATURE, up.USER_ACCEPT_PM,
			up.USER_HOMEPAGE, up.USER_VISIBLE_ONLINE_STATUS, up.USER_MOOD, p.POST_POSTER_NAME
		FROM	ubbt_POSTS AS p,
			ubbt_USERS AS u,
			ubbt_USER_PROFILE as up
		WHERE	p.TOPIC_ID  = 126746
			AND p.USER_ID = u.USER_ID
			AND p.USER_ID = up.USER_ID
			AND p.POST_IS_APPROVED = '1'
		ORDER BY p.POST_ID
	LIMIT  - 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 '' at line 18


Ironically I am seeing custom headers in forums that have a custom header.

Anyone have any suggestions??

Thanks

Joined: Jun 2006
Posts: 3,839
Likes: 1
I
Ian
Offline
Carpal Tunnel
Carpal Tunnel
I Offline
Joined: Jun 2006
Posts: 3,839
Likes: 1
Okay - uploaded backup copies of header.php, footer.php, and config.inc.php.

This got everything working again, to a degree - the header, footer, header insert files were all blank.

However when I try and update admin/gen_display.php I get

Forbidden
You do not have permission to access this document.

Also when I view /admin/phpinfo.php

I get

Forbidden
You do not have permission to access this document.

I can update say admin/features.php without any issues. I cannot see any permissions issues and have re-uploaded the files.

Running

mysql 5.0.22
php 5.1.6


All very strange frown

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
The 2 SQL errors appear to be someone visiting showflat and they don't have a limit set for the number of topics per page. I'm guessing since the config file wasn't working, it couldn't use the config default.

As for the the Forbidden errors. What permissions are set on the scripts giving those errors. I know you said you can't see any issues, but just checking if they are the same as the ones that are working.

Joined: Jun 2006
Posts: 3,839
Likes: 1
I
Ian
Offline
Carpal Tunnel
Carpal Tunnel
I Offline
Joined: Jun 2006
Posts: 3,839
Likes: 1
currently 666

exactly the same permissions as admin/dofeatures.php which works fine.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
You wouldn't happen to have mod_security enabled would you?

Joined: Jun 2006
Posts: 3,839
Likes: 1
I
Ian
Offline
Carpal Tunnel
Carpal Tunnel
I Offline
Joined: Jun 2006
Posts: 3,839
Likes: 1
Thank you laugh

Forgot that frown

Joined: Jun 2006
Posts: 16,535
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,535
Likes: 150
Originally Posted by Rick
You wouldn't happen to have mod_security enabled would you?
Ahh the grand solution I bring to the table... lol... god I hate this module!


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: 3,839
Likes: 1
I
Ian
Offline
Carpal Tunnel
Carpal Tunnel
I Offline
Joined: Jun 2006
Posts: 3,839
Likes: 1
Yes, but why affect these two sections and not other ones?

Joined: Jun 2006
Posts: 16,535
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,535
Likes: 150
Certain words in a page will make mod_security barf... It's a truely horrible module that bans even the most harmless scripts...


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!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Slow Queries - Any Ideas?
by BellaOnline - 10/16/2026 4:34 PM
Selling a Forum?
by ECNet - 10/10/2026 10:54 AM
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Who's Online Now
0 members (), 233 guests, and 188 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)