Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jun 2006
Posts: 998
Likes: 25
Old Hand
Old Hand
Joined: Jun 2006
Posts: 998
Likes: 25
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
https://www.britbike.com/forums/ubbthreads.php
Joined: Dec 2003
Posts: 6,630
Likes: 85
Joined: Dec 2003
Posts: 6,630
Likes: 85
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 12:29 PM.

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jun 2006
Posts: 16,369
Likes: 126
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,369
Likes: 126
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,630
Likes: 85
Joined: Dec 2003
Posts: 6,630
Likes: 85
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 3:09 PM. Reason: Added Comment

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jun 2006
Posts: 998
Likes: 25
Old Hand
Old Hand
Joined: Jun 2006
Posts: 998
Likes: 25
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
https://www.britbike.com/forums/ubbthreads.php
Joined: Jan 2004
Posts: 2,474
Likes: 3
D
Pooh-Bah
Pooh-Bah
D Offline
Joined: Jan 2004
Posts: 2,474
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

Joined: Jun 2006
Posts: 16,369
Likes: 126
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,369
Likes: 126
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: 998
Likes: 25
Old Hand
Old Hand
Joined: Jun 2006
Posts: 998
Likes: 25
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
https://www.britbike.com/forums/ubbthreads.php
Joined: Jun 2006
Posts: 998
Likes: 25
Old Hand
Old Hand
Joined: Jun 2006
Posts: 998
Likes: 25
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
https://www.britbike.com/forums/ubbthreads.php
Joined: Apr 2004
Posts: 1,974
Likes: 154
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,974
Likes: 154
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: UBB.threads 8.0.0 // wip: UBB.threads 8.0.1
isaac @ id242.com // my forum @ CelicaHobby.com
1 member likes this: Gizmo
Joined: Jun 2006
Posts: 998
Likes: 25
Old Hand
Old Hand
Joined: Jun 2006
Posts: 998
Likes: 25
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; 10/23/2020 5:48 PM.

Morgan Johansson
BritBike Forum
https://www.britbike.com/forums/ubbthreads.php
1 member likes this: isaac
Joined: Jun 2006
Posts: 998
Likes: 25
Old Hand
Old Hand
Joined: Jun 2006
Posts: 998
Likes: 25
Feedback: Two days and non of those limit errors which is good! However
Since I'm looking into the error logs I notised an old
Search error that I've seen a lot in the past
It fight not be the right topic to post it in so feel free to delete
The issue is similar I guess though. I wonder what cause it?

Quote
Script: /xxxxx/xxxxx/xxxxx/xxxxx/scripts/dosearch.inc.php - Line: 571
SELECT p.POST_ID
FROM ubbt_POSTS p LEFT JOIN ubbt_POSTS pp on p.POST_ID=pp.POST_ID,
ubbt_TOPICS t
WHERE p.POST_IS_APPROVED = '1'
AND t.TOPIC_STATUS <> 'M'
AND t.FORUM_ID IN ('1')
AND p.TOPIC_ID = t.TOPIC_ID
AND ( (LOWER(p.POST_DEFAULT_BODY) LIKE LOWER('%kickestart%')) (LOWER(p.POST_DEFAULT_BODY) LIKE LOWER('%lever%')))

AND p.POST_POSTED_TIME > '972851177'


ORDER BY p.POST_POSTED_TIME DESC
LIMIT 200 - 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 '(LOWER(p.POST_DEFAULT_BODY) LIKE LOWER('%lever%')))

AND p.POST_POSTED_TIME ' at line 8

Last edited by Morgan; 10/25/2020 3:26 AM.

Morgan Johansson
BritBike Forum
https://www.britbike.com/forums/ubbthreads.php
Joined: Jun 2006
Posts: 998
Likes: 25
Old Hand
Old Hand
Joined: Jun 2006
Posts: 998
Likes: 25
Feedback, it has now passed several months and the error log is still empty...
Very good work.
Thanks


Morgan Johansson
BritBike Forum
https://www.britbike.com/forums/ubbthreads.php

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Profile avatar storage settings
by SenecaFlyer - 12/05/2024 1:24 PM
Not allowing attachment over 2m
by ehill - 12/03/2024 3:16 PM
New Admin Here
by SenecaFlyer - 12/02/2024 4:14 PM
Who's Online Now
1 members (Ruben), 1,798 guests, and 97 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)