Install of BNT on PHP 7.0 and Unix

Trying to install BNT? No guarantees we can help you (especially if you're hosting it on windows) but we''ll try.

User avatar

Posts: 2

Joined: Sat Nov 04, 2017 5:23 am

Post Sat Nov 04, 2017 5:44 am

Install of BNT on PHP 7.0 and Unix

Good day folks,
I am not exactly new to BNT, and have installed it before. However, I am using a server which runs only PHP version 7.0. BNT refuses to run on the server, displaying in the Apache error log error's regarding PHP code.
When i use to run BNT before, it ran just fine. So my question (mostly to the developer/developers) of BNT is, will BNT run on PHP 7 with code modification's, or what is the last version of PHP that BNT will successfully run on.
The BNT I am attempting to run was from source-forge, version 0.633 I believe, and I have created the database required for BNT to function.
The database engine that is being used is MyISAM, and the database server is MariaDB.
The server that this BNT copy is being run on is a Linux server with Apache 2.2 and PHP 7.1.19. Any help regarding this would be appreciated.
User avatar

Site Admin

Posts: 211

Joined: Thu Apr 17, 2014 10:15 am

Post Sat Nov 04, 2017 3:51 pm

Re: Install of BNT on PHP 7.0 and Unix

Well I did try BNT on PHP 7.x and it had loads of issues, plus our forums don't work on PHP 7.x so I reverted back to PHP 5.5.38 which is what we are currently running.

Well the version of BNT that I run here is a heavily modified version of the release code so that it worked fine on our servers and a lot is hard coded which was why this version never made it to a release version.

So the release code should work ok with PHP 5.5.38 at the least, but "might" require a few tweaks here and there to get working.
I am not saying it wont work on newer versions of PHP.

Well I have only tested BNT with MySQL, however MariaDB is a fork off MySQL, so that "should" be fine.

TBH I think your issue is solely PHP 7.x causing issues.

Let me setup a VM Box with PHP 7.x to see what is happening with the latest release version, I assume you are using release version 0.66, so I will try that version.
TheMightyDude::Blacknova Development.
Development Blog Twitter
User avatar

Site Admin

Posts: 211

Joined: Thu Apr 17, 2014 10:15 am

Post Sat Nov 04, 2017 5:22 pm

Re: Install of BNT on PHP 7.0 and Unix

OK, Release 0.663 can work with PHP 7.0 but a few changes need to be done.

First thing to do is put the game into development mode...
Create a file called dev and put it in the root folder of bnt (same folder as create_universe.php)

Refresh the page in the browser.
You will either still get the white screen stating the server crashed / server error etc, or you will be given some errors.

Anyhow, to fix the issues I have seen so far (i.e. in the 20 mins of testing)

In file includes/load_languages.php

Line(s) 42 and 43 change from:
  Code:
global $$row['name'];
$
$row['name'] = $row['value']; 

change to the following:
  Code:
global ${$row['name']};
${
$row['name']} = $row['value'];


After that fix, refresh the screen, it should now be moaning about static errors with ADODB...

In file global_includes.php

Line(s) 62 change from:
  Code:
include_once $ADOdbpath . "/session/adodb-session.php";

change to the following:
  Code:
include_once $ADOdbpath . "/session/adodb-session2.php";


At this point you should be able to create the universe and log into the game.

*** CAUTION THERE WILL MOST PROBABLY BE LOADS OF ERRORS IN THE CODE ***

You will have to test all the features of the game to determine the game is working fine.

That should get you starting.
TheMightyDude::Blacknova Development.
Development Blog Twitter
User avatar

Posts: 2

Joined: Sat Nov 04, 2017 5:23 am

Post Sat Nov 04, 2017 5:32 pm

Re: Install of BNT on PHP 7.0 and Unix

Thanks for a quick reply. Any plans to re-write BNT for later versions of PHP? MariaDB works just fine, in PHP 5.6 which I downgraded 7.0 for, the setup_info showed I believe 2 errors, but ran just fine errors aside.
User avatar

Site Admin

Posts: 211

Joined: Thu Apr 17, 2014 10:15 am

Post Sat Nov 04, 2017 5:52 pm

Re: Install of BNT on PHP 7.0 and Unix

phoenix wrote:Thanks for a quick reply. Any plans to re-write BNT for later versions of PHP? MariaDB works just fine, in PHP 5.6 which I downgraded 7.0 for, the setup_info showed I believe 2 errors, but ran just fine errors aside.

Setup Info has been broken for a while now.

As for a re-write, hmmm.
Well I was in the middle of a complete new version of BNT, this can be read here: Development Update...

To be honest, I was going to do a complete re-code from scratch to still use the current latest versions of LAMP (I.e. Linux, Apache2, MySQL and PHP), sadly due to the lack of interest of the users and also the lack on current users, I didn't feel it would be worth all the time and I am referring year(s) here to do a new version of the same game for just 30 odd players.

TBH, I should of done the recode several years back when there were loads more users playing.

Now due to all the limitation of how HTML works, we are limited on what can do and what features we can add, so I had plans to move away from browsers over to a desktop application.

That's has also been put on hold until I see what is happening when Ron Harwood (owner of BNT), I don't want to start something if we end up going a different direction, but I still plan to do a version later on.
TheMightyDude::Blacknova Development.
Development Blog Twitter

Return to Installation Help



Who is online

Users browsing this forum: No registered users and 1 guest

cron