Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help please #5

Closed
fatboi615 opened this issue Jan 7, 2015 · 25 comments
Closed

help please #5

fatboi615 opened this issue Jan 7, 2015 · 25 comments

Comments

@fatboi615
Copy link

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
Copy link
Owner

Fonta commented Jan 7, 2015

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
Copy link
Author

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
Copy link
Owner

Fonta commented Jan 7, 2015

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
Copy link
Author

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
Copy link
Owner

Fonta commented Jan 7, 2015

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
Copy link
Author

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
Copy link
Owner

Fonta commented Jan 7, 2015

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
Copy link
Author

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
Copy link
Author

im using mysql through xxamp btw

@Fonta
Copy link
Owner

Fonta commented Jan 7, 2015

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
Copy link
Author

http://prntscr.com/5po9lp

:(

@Fonta
Copy link
Owner

Fonta commented Jan 7, 2015

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
Copy link
Author

@fatboi615
Copy link
Author

@Fonta
Copy link
Owner

Fonta commented Jan 7, 2015

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

@fatboi615
Copy link
Author

@fatboi615
Copy link
Author

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

@Fonta
Copy link
Owner

Fonta commented Jan 7, 2015

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
Copy link
Author

@fatboi615
Copy link
Author

:(

@Fonta
Copy link
Owner

Fonta commented Jan 7, 2015

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
Copy link
Author

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

@Fonta
Copy link
Owner

Fonta commented Jan 7, 2015

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
Copy link
Author

@Fonta Fonta closed this as completed Jan 24, 2016
@Fonta
Copy link
Owner

Fonta commented Jan 25, 2016

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_.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants