Unable to buy anything from any special port.

Where we find trouble with the latest release... and shoot it.

User avatar
TheMightyDude
Site Admin
Posts: 311
Joined: Thu Apr 17, 2014 09:15 UTC

Re: Unable to buy anything from any special port.

Post by TheMightyDude » Wed May 20, 2020 14:22 UTC

usalabs wrote: Wed May 20, 2020 14:12 UTC OK, I changed to PHP 7.2 and when I tried to create the universe, it got the the point of dropping the databses, then this happens:

I just ignored the errors and continued, and so far everything seems to work, I'm still going through the bits, I can now buy from a space port without and of those errors.
Hmm, I am not seeing that my side, ah yes I have seen that before, try adding that fix I posted for connectdb.php, then try re-creating the universe.
TheMightyDude::Blacknova Development.
Development Blog YouTube Dev Channel Twitter Twitch

usalabs
Posts: 26
Joined: Tue May 19, 2020 13:29 UTC

Re: Unable to buy anything from any special port.

Post by usalabs » Wed May 20, 2020 14:28 UTC

I did the addition to that file, and as there is no way of posting a screenshot on here, I'll have to just copy and paste the error I got when on the logout page:-

Notice: Trying to get property 'fields' of non-object in /var/www/bnt/includes/gen_score.php on line 90

Notice: Trying to get property 'fields' of non-object in /var/www/bnt/includes/gen_score.php on line 94

User avatar
TheMightyDude
Site Admin
Posts: 311
Joined: Thu Apr 17, 2014 09:15 UTC

Re: Unable to buy anything from any special port.

Post by TheMightyDude » Wed May 20, 2020 14:32 UTC

usalabs wrote: Wed May 20, 2020 14:28 UTC As there is no way of posting a screen shot on here, I'll have to just copy and paste the error I got when on the logout page:-

Notice: Trying to get property 'fields' of non-object in /var/www/bnt/includes/gen_score.php on line 90

Notice: Trying to get property 'fields' of non-object in /var/www/bnt/includes/gen_score.php on line 94
Those Notices are fixed with that code change in connectdb.php, do that fix and logout will work, its due to the changes MySQL did.

This is what is logged:
"ERROR: In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'bnt.bnt_planets.base'; this is incompatible with sql_mode=only_full_group_by"
TheMightyDude::Blacknova Development.
Development Blog YouTube Dev Channel Twitter Twitch

usalabs
Posts: 26
Joined: Tue May 19, 2020 13:29 UTC

Re: Unable to buy anything from any special port.

Post by usalabs » Wed May 20, 2020 14:53 UTC

I just copied that line of code where it should be and I still get those errors. at the very top of the logout screen.

Notice: Trying to get property of non-object in /var/www/bnt/includes/gen_score.php on line 90

Notice: Trying to get property of non-object in /var/www/bnt/includes/gen_score.php on line 94
Logout
You current score is 0.

To see for yourself, login using a test player:-

URL = http://home-regions.no-ip.org/traders
Username = nobody@nowhere.com
Passwd = fixmyerrors

Then buy 1 hull at the space port, then go back to the main menu, and logout, you should see those errors appear.

User avatar
TheMightyDude
Site Admin
Posts: 311
Joined: Thu Apr 17, 2014 09:15 UTC

Re: Unable to buy anything from any special port.

Post by TheMightyDude » Wed May 20, 2020 15:07 UTC

Says that user doesn't exist.

I get that same Notice Message as you when I remove that fix in connectdb.php

Its a non-object (i.e. $res is being set to a Boolean false due to its failing the query) because the changes MySQL made that requires full / complete GROUP_BY in the queries, which is what that change in connectdb.php disables.

Also it looks like the database wasn't created fully.

You are not using a persistent connection are you ? if so disable it.
TheMightyDude::Blacknova Development.
Development Blog YouTube Dev Channel Twitter Twitch

usalabs
Posts: 26
Joined: Tue May 19, 2020 13:29 UTC

Re: Unable to buy anything from any special port.

Post by usalabs » Wed May 20, 2020 15:15 UTC

Duh!!!!!!, I realized that when the universe is freshly created, the users are all deleted too, so I re-created that test player, can you try again,,, this time id does work lol

No persisten connection is used.

$db_persistent = 0;

User avatar
TheMightyDude
Site Admin
Posts: 311
Joined: Thu Apr 17, 2014 09:15 UTC

Re: Unable to buy anything from any special port.

Post by TheMightyDude » Wed May 20, 2020 15:19 UTC

Can you zip up the connectdb.php file and send it to support@blacknova.net because I still think that logout error is linked to that connection.

What about $ADODB_SESSION_DRIVER, is that set to mysqli (notice the I at the end)
TheMightyDude::Blacknova Development.
Development Blog YouTube Dev Channel Twitter Twitch

usalabs
Posts: 26
Joined: Tue May 19, 2020 13:29 UTC

Re: Unable to buy anything from any special port.

Post by usalabs » Wed May 20, 2020 15:28 UTC

On its way.

The DB driver is set to mysqli as it was set in the db_config.php file, along with the files you posted as a zip file.

I made a backup of my bnt folder, the overwritten the existing files with the ones from the zip, then re-configured db_config.php for the DB I use, and re-configured the settings in config.php just for testing.

User avatar
TheMightyDude
Site Admin
Posts: 311
Joined: Thu Apr 17, 2014 09:15 UTC

Re: Unable to buy anything from any special port.

Post by TheMightyDude » Wed May 20, 2020 15:33 UTC

I needed the connectdb.php file located in the includes folder.
TheMightyDude::Blacknova Development.
Development Blog YouTube Dev Channel Twitter Twitch

usalabs
Posts: 26
Joined: Tue May 19, 2020 13:29 UTC

Re: Unable to buy anything from any special port.

Post by usalabs » Wed May 20, 2020 15:53 UTC

TheMightyDude wrote: Wed May 20, 2020 15:33 UTC I needed the connectdb.php file located in the includes folder.
LoL, I'm as blind as a bat.

Post Reply