Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pushed] MySQL Error in ModCP
#1
Im getting this mod cp error can someone help me please

[Image: 0NKEoj4.png]
#2
What version of MyBB are you using? The correct field name should be visible, not visibility. Make sure you upgrade to the latest version if you aren't running at least 1.6.14.
#3
Im running 1.6.15 this error happened after i upgraded from 1.6.14 to 1.6.15
#4
Moved to 1.6 Bugs and I'll I'm confirming the issue also exists here.

Steps to reproduce:
Mod CP->IP Search Then make sure Search Posts is checked.

For the devs here is the link to the line that produces the error.
https://github.com/mybb/mybb/blob/master....php#L2615

Correct code should be
$query = $db->query("
					SELECT COUNT(pid) AS count
					FROM ".TABLE_PREFIX."posts
					WHERE {$post_ip_sql} AND visible >= 0
				");

Edit Found another occurrence on line 2766

Correct code should be
$query = $db->query("
				SELECT username AS postusername, uid, subject, pid, tid, ipaddress
				FROM ".TABLE_PREFIX."posts
				WHERE {$post_ip_sql} AND visible >= 0
				ORDER BY dateline DESC
				LIMIT {$post_start}, {$post_limit}
			");
#5
Is this something major
#6
It doesn't affect security in any way. If you go to your modcp.php and make those edits I did in my previous post, those errors will go away.
#7
(2014-08-05, 08:12 PM)dragonexpert Wrote: It doesn't affect security in any way. If you go to your modcp.php and make those edits I did in my previous post, those errors will go away.

The edit fixed the issue for me! Thanks!
MyBB 1.8.22 (x4)
7173Mustangs.com, pa2a.org, pazrt.com & paguntalk.com
#8
@dragonexpert: I just update my forum to MyBB 1.6.15 and the code updated as you said but the issue is not fixed for me.
And more:
1. IP Address: Logged -> Hostname: always show: N/A (Unable to resolve)
2. Search for users with this IP: sometime it returns: not found(Why it not found whilst I track this from a post of specify user?)
3. Information on this IP address: always show: Host Name: N/A and GeoIP Location: N/A too!!!
How can I solve these issues?
Many thanks in advance!
#9
What exactly is not fixed? The error is caused by wrong column name so the code provided by dragonexpert has to fix this problem.

As for N/A issue - do you have any PHP extension that provides geoip functions? If not, that's the reason. We can't do anything about it.
#10
(2014-08-07, 10:05 PM)Destroy666 Wrote: What exactly is not fixed? The error is caused by wrong column name so the code provided by dragonexpert has to fix this problem.

As for N/A issue - do you have any PHP extension that provides geoip functions? If not, that's the reason. We can't do anything about it.

I don't know about PHP extention that provides geoIP functions, I will Google it for myself.
Here is my problem:

   

or

   

I cannot Search for posts with this IP for any user's IP.
What about: Search for users with this IP?

   

and I got this:

   

Thank you!


Forum Jump:


Users browsing this thread: 1 Guest(s)