Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jun 2006
Posts: 832
Likes: 13
Morgan Online Happy OP
Old Hand
OP Online Happy
Old Hand
Joined: Jun 2006
Posts: 832
Likes: 13
Noticed this error log, could it be a bug?
Thanks
Morgan


Sat, Mar 21 2020 14:57:18 +0000
Script: xxxxx/xxxxx/xxxxx/scripts/postlist.inc.php - Line: 496
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, t3.USER_GROUP_IMAGES
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 = 1
AND t1.TOPIC_IS_STICKY = '0'

AND t1.TOPIC_IS_APPROVED = '1'
ORDER BY t1.TOPIC_LAST_REPLY_TIME desc
LIMIT 3.0302802803E+14, 26
- 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 '3.0302802803E+14, 26' at line 17


Morgan Johansson
BritBike Forum
http://www.britbike.com/forums/ubbthreads.php
Joined: Dec 2003
Posts: 6,255
Likes: 35
Online Yawn
Joined: Dec 2003
Posts: 6,255
Likes: 35
Getting the same error but for maria
Below is one of several of the same error
Quote
Script: /home/sundan21/public_html/forum/scripts/postlist.inc.php - Line: 496
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, t3.USER_GROUP_IMAGES
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 = 46
AND t1.TOPIC_IS_STICKY = '0'

AND t1.TOPIC_IS_APPROVED = '1'
ORDER BY t1.TOPIC_LAST_REPLY_TIME desc
LIMIT 1.81816816818E+14, 16
- You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1.81816816818E+14, 16' at line 17

Using v7.7.4
Web Server Apache
PHP Version 7.2.24
MYSQL Version 10.2.31-MariaDB-log
tables set to utf8mb4_general_ci using the included tool

Last edited by Ruben; 04/02/2020 1:29 PM.

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jun 2006
Posts: 16,001
Likes: 49
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,001
Likes: 49
These don't seem like legitimate requests; I say that as the "limit" is "1.81816816818E+14" which is throwing the error... It'd appear that invalid data is being passed as the page number in user requests...
Valid: https://www.ubbcentral.com/forums/ubbthreads.php/forums/3/1/bug-reports
Invalid: https://www.ubbcentral.com/forums/ubbthreads.php/forums/3/1.54/bug-reports (see the .)
Invalid: https://www.ubbcentral.com/forums/ubbthreads.php/forums/3/1238762837698623849762345/bug-reports (see the absurdly long page number)

Do you have legitimate users reporting problems with viewing forums, or are you simply just pulling information from SQL logs?

Its entirely possible that this is some bot that sees that the page id is fetched via a URL and is pinging every conceivable page for content, and at some point it gets such a high number that it begins generating errors...


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, Scouters World
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!
1 member likes this: isaac
Joined: Dec 2003
Posts: 6,255
Likes: 35
Online Yawn
Joined: Dec 2003
Posts: 6,255
Likes: 35
My data comes from the log without a user associated with them
The value in the limit is different on some errors logged
Oh they did occur over 12 seconds for 5 of them some were 1 second apart.

The only complaint with members is the long initial posting time which is excessively long like 60 seconds or more at times.
But that is another story

Last edited by Ruben; 04/02/2020 4:09 PM. Reason: Added Comment

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jun 2006
Posts: 832
Likes: 13
Morgan Online Happy OP
Old Hand
OP Online Happy
Old Hand
Joined: Jun 2006
Posts: 832
Likes: 13
Hi
Have receivied these types of error in the error log for quiet sometime now.
Any ideas what it might be?
thanks

Quote
Sat, Oct 17 2020 00:23:29 +0000
Script: /home/xxxx/xxxx/xxxx/scripts/postlist.inc.php - Line: 496
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, t3.USER_GROUP_IMAGES
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 = 1
AND t1.TOPIC_IS_STICKY = '0'

AND t1.TOPIC_IS_APPROVED = '1'
ORDER BY t1.TOPIC_LAST_REPLY_TIME desc
LIMIT 27755.25, 26
- 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 '27755.25, 26' at line 17


Morgan Johansson
BritBike Forum
http://www.britbike.com/forums/ubbthreads.php
Joined: Jan 2004
Posts: 2,473
Likes: 3
Pooh-Bah
Offline
Pooh-Bah
Joined: Jan 2004
Posts: 2,473
Likes: 3
Quote
Script: /xxxxx/scripts/activetopics.inc.php - Line: 159
SELECT t1.FORUM_ID, t1.FORUM_TITLE, t3.POST_SUBJECT, t3.POST_ICON, t3.POST_POSTED_TIME, t2.TOPIC_LAST_POSTER_NAME, t3.POST_BODY,
t2.TOPIC_ID, t3.POST_ID, t1.FORUM_IS_GALLERY, t2.TOPIC_VIEWS, t2.TOPIC_REPLIES, t2.TOPIC_CREATED_TIME, t4.USER_MEMBERSHIP_LEVEL,
t4.USER_ID,t5.USER_NAME_COLOR
FROM ubbt_FORUMS as t1,
ubbt_TOPICS as t2,
ubbt_POSTS as t3,
ubbt_USERS as t4,
ubbt_USER_PROFILE as t5
WHERE t1.FORUM_ID IN (1,23,29,7,21,9,2,16,11,15,10,13,5,25,3,4,30,6,14,22,31)
AND t1.FORUM_ACTIVE_POSTS = 1
and t2.TOPIC_LAST_POST_ID = t3.POST_ID and t2.TOPIC_LAST_REPLY_TIME > 1600167263 and t2.TOPIC_LAST_POSTER_ID = t4.USER_ID
AND t2.FORUM_ID = t1.FORUM_ID
AND t2.TOPIC_STATUS <> 'M'
AND t2.TOPIC_IS_APPROVED = 1
AND t4.USER_ID = t5.USER_ID
ORDER BY t2.TOPIC_LAST_REPLY_TIME DESC
limit 3.0302802803028E+14, 25
- You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '3.0302802803028E+14, 25' at line 17


Using version :: 7.7.4
Joined: Jun 2006
Posts: 16,001
Likes: 49
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,001
Likes: 49
The value for the current page of a thread is invalid; that is why MySQL is returning an error (you can generate the error by throwing a huge number in the "page" value of the URL; anything higher than 99999999999999999 will throw the error, whereas 99999999999999999 and below will be smooth sailing).

From your logs, the page values are:
Morgan: LIMIT 27755.25, 26
Driv: limit 3.0302802803028E+14, 25

I figure that I should post this again, since I posted it in April and had absolutely zero feedback.
Quote
Do you have legitimate users reporting problems with viewing forums, or are you simply just pulling information from SQL logs?

How many entries for these invalid queries are in your logs? How large are your log files? It would seem that it could be a bot of some sort just trying to increase pages to infinity during a crawl to get invalid values.

I have merged this with the previous bug report thread; but the issue remains the same, invalid pages are being passed from the user browser to the system.


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, Scouters World
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!
1 member likes this: isaac
Joined: Jun 2006
Posts: 832
Likes: 13
Morgan Online Happy OP
Old Hand
OP Online Happy
Old Hand
Joined: Jun 2006
Posts: 832
Likes: 13
Gizmo I get between 1-3 of these Error messages per day but
I would say it comes in waves as there are times with no errors.


Morgan Johansson
BritBike Forum
http://www.britbike.com/forums/ubbthreads.php
Joined: Jun 2006
Posts: 832
Likes: 13
Morgan Online Happy OP
Old Hand
OP Online Happy
Old Hand
Joined: Jun 2006
Posts: 832
Likes: 13
More input

one error massage is 1202 bytes see image. I delete messages from time to time these in the image is recently

I have only seen the error logs no member has complained

[Linked Image]


Morgan Johansson
BritBike Forum
http://www.britbike.com/forums/ubbthreads.php
Joined: Apr 2004
Posts: 1,796
Likes: 92
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,796
Likes: 92
The error presented seems to be triggered when a URL has been manipulated to add more pages than what is intended or is available.

The errors do not break anything or share private information with any of your forum visitors. When triggered, a basic error message is displayed to the user (full error if you have debugging turned on). The full SQL error is appended to the daily SQL error log file when you have Database Error Logging enabled.


You can receive the following fixes when UBB.threads 7.7.5 is released, or you can apply them yourself now. The fixes are simple and are added below:

FIND IN /scripts/activetopics.inc.php
AROUND LINE 122
Code
	// What is our limit clause?
	if ($page == 1) {
		$limit = "limit $PostsPer";
	} else {
		$limit = "limit " . (($page - 1) * $PostsPer) . ", $PostsPer";
	}
REPLACE WITH:
Code
	// What is our limit clause?
	if ($page == 1) {
		$limit = "LIMIT $PostsPer";
	} else {
		$Startat = ($page - 1) * $PostsPer;
		if (!is_int($Startat)) $Startat = 0;
		$limit = "LIMIT $Startat, $PostsPer";
	}


FIND IN /scripts/postlist.inc.php
AROUND LINE 461
Code
	// the previous and nexts posts will be
	if ($page == 1) {
		$Totalgrab = $PostsPer;
		$Posts = $PostsPer + 1;
	} else {
		$Startat = ($page - 1) * $PostsPer;
		$Posts = $PostsPer + 1;
		if (!is_numeric($Startat)) $Startat = 0;
		$Totalgrab = "$Startat, $Posts";
	}
REPLACE WITH:
Code
	// the previous and nexts posts will be
	if ($page == 1) {
		$Totalgrab = $PostsPer;
		$Posts = $PostsPer + 1;
	} else {
		$Startat = ($page - 1) * $PostsPer;
		$Posts = $PostsPer + 1;
		if (!is_int($Startat)) $Startat = 0;
		$Totalgrab = "$Startat, $Posts";
	}


FIND IN /scripts/showmembers.inc.php
AROUND LINE 141
Code
	// Here we grab the users for this page
	if ($page == 1) {
		$Totalgrab = $per_page;
	} else {
		$Startat = (($page - 1) * $per_page);
		if ($Startat < 0) $Startat = 0;
		$Totalgrab = "$Startat, $per_page";
	}
REPLACE WITH:
Code
	// Here we grab the users for this page
	if ($page == 1) {
		$Totalgrab = $per_page;
	} else {
		$Startat = ($page - 1) * $per_page;
		if (!is_int($Startat)) $Startat = 0;
		$Totalgrab = "$Startat, $per_page";
	}


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.4 // Work In Progress: UBBT 7.7.5
isaac @ id242.com // my forum @ CelicaHobby.com
1 member likes this: Gizmo
Joined: Jun 2006
Posts: 832
Likes: 13
Morgan Online Happy OP
Old Hand
OP Online Happy
Old Hand
Joined: Jun 2006
Posts: 832
Likes: 13
Originally Posted by isaac
You can receive the following fixes when UBB.threads 7.7.5 is released, or you can apply them yourself now. The fixes are simple and are added below:

Isaac, I got seven error messages like this today so I applied your fixes in those three files.
Hopefully it will be ok now. I'll give feedback after a while.

Thanks

Last edited by Morgan; Yesterday at 06:48 PM.

Morgan Johansson
BritBike Forum
http://www.britbike.com/forums/ubbthreads.php
1 member likes this: isaac

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Issue Upgrading from 7.7.3 to 7.7.4
by Jake - 10/23/2020 3:02 PM
MySQL 5.6 upgrade to 5.7
by Morgan - 10/19/2020 6:19 AM
Custom islands error
by Morgan - 10/18/2020 7:25 AM
Saved Member Searches Enhancement
by Ruben - 10/10/2020 1:17 PM
RSS Feeds
by Mors - 10/06/2020 6:44 PM
Who's Online Now
2 members (Morgan, Ruben), 58 guests, and 66 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
gallery test
gallery test
by Mors, September 23
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 7.7.5
(Snapshot build 20201022)