Fonta / TSLink

Servergroup control on TeamSpeak from MyBB forum
GNU General Public License v3.0
4 stars 1 forks source link

help please #5

Closed fatboi615 closed 8 years ago

fatboi615 commented 9 years ago

ok i set everything again and still this error "Fatal error: Call to a member function fetch_array() on a non-object in C:\xampp\htdocs\inc\plugins\tslink\tslinkfunctions.php on line 282" http://prntscr.com/5pn0f2 - screenshot of my conf file. any help would be awesome, i followed your tutorial part for part and nothing still .

Fonta commented 9 years ago

Try to uninstall and install from the plugin panel in the ACP. Might be that the memberstatus row isn't added to the mybb_users table.

fatboi615 commented 9 years ago

I still get the same error "Fatal error: Call to a member function fetch_array() on a non-object in C:\xampp\htdocs\inc\plugins\tslink\tslinkfunctions.php on line 282"

Fonta commented 9 years ago

Can you try to change line 280 & 281 from: $$mybb_user_query = "SELECT * FROM $table WHERE HEX(lastip) = '$mybb_ip' LIMIT 1"; $mybb_users = $ConnectDB->query($$mybb_user_query); to: $mybb_user_query = "SELECT * FROM $table WHERE HEX(lastip) = '$mybb_ip' LIMIT 1"; $mybb_users = $ConnectDB->query($mybb_user_query);

fatboi615 commented 9 years ago

Fatal error: Call to a member function fetch_array() on a non-object in C:\xampp\htdocs\inc\plugins\tslink\tslinkfunctions.php on line 282

Fonta commented 9 years ago

For testing, put the following between line 281 and 282 in tslinkfunctions.php print_r($mybb_users->fetch_array(MYSQLI_ASSOC)); die(); So it will look like this: http://i.imgur.com/LFkipGg.png After placing it, press the update groups button in the UserCP. Tell me if you get back an array with a whole bunch of information like here: http://hastebin.com/timogekami.txt or if you get an error.

fatboi615 commented 9 years ago

Fatal error: Call to a member function fetch_array() on a non-object in C:\xampp\htdocs\inc\plugins\tslink\tslinkfunctions.php on line 282

http://prntscr.com/5pnyj7 - screen of code so u know its right lulz

Fonta commented 9 years ago

I think you're getting a sql error because the error you're getting means it doesn't have anything to work with. Let's see if we're able to get the sql error visible. Try to change to block to this: http://hastebin.com/inuxomuluz.php

fatboi615 commented 9 years ago

Fatal error: Call to a member function fetch_array() on a non-object in C:\xampp\htdocs\inc\plugins\tslink\tslinkfunctions.php on line 282 im still getting this after changing that block, im sorry if this makes you mad i understand if u cant help any more.

fatboi615 commented 9 years ago

im using mysql through xxamp btw

Fonta commented 9 years ago

Probably some kind of caching going on. Try to put this after line 282: echo "test"; die();

so it will look like this: http://i.imgur.com/9I3YIOM.png

fatboi615 commented 9 years ago

http://prntscr.com/5po9lp

:(

Fonta commented 9 years ago

try putting the echo on line 282 and so line 282 becomes 283. See if it gives the test in front of the error. And try it from here: http://nameless-community.com/usercp.php?action=tslink

fatboi615 commented 9 years ago

http://prntscr.com/5poegg

fatboi615 commented 9 years ago

http://prntscr.com/5poeso

Fonta commented 9 years ago

die(); has to be underneath. http://i.imgur.com/bNMM5HK.png Your webserver is caching. Restart it to clear the cache.

fatboi615 commented 9 years ago

http://prntscr.com/5pojco

fatboi615 commented 9 years ago

http://prntscr.com/5pojnm ok now im getting "test"

Fonta commented 9 years ago

What do you get if you change the echo "test"; to: print_r($mybb_users); Something like this? http://i.imgur.com/ouzBYST.png

fatboi615 commented 9 years ago

http://prntscr.com/5pooh0

fatboi615 commented 9 years ago

:(

Fonta commented 9 years ago

If you change print_r($mybb_users); to: echo $mybb_ip; Does it give some hex code? And if yes, is it the same as in the database -> mybb_users -> lastip Are these the same? Your user account is not being found in the database. That's why you're getting an error.

fatboi615 commented 9 years ago

http://prntscr.com/5ppibq still this!

Fonta commented 9 years ago

That's really really strange because that would mean that it's isn't getting results from the database because there isn't any ip address being used. Are you sure you didn't forget to clear your cache? What version of php are you running? can you make a screenshot of the last part of the config.php? This is where the ip is being converted to hex.

fatboi615 commented 9 years ago

http://prntscr.com/5pq95l

Fonta commented 8 years ago

Hi Fatboi, I don't know if you solved the issue but I've changed some things and fixed some minor bugs. Your issue of not getting results back from the database might also be solved with this. It might be that your mybb database uses a other prefix than mybb_.