Unable to buy anything from any special port.
Unable to buy anything from any special port.
I'm setting up a game server and downloaded BlackNova Trader from the sourceforge, installed it and set it up on my server, and now I'm testing it to see how it plays, but I can't buy anything from any special ports, I get this message:-
Your last Sales Transaction has already been delivered, Please enter the Special Port and select your order.
I did, I entered the port at sector 0 and I don't see anything of any stuff I supposed to have bought.
Do I need to delete all the files and start again?
Your last Sales Transaction has already been delivered, Please enter the Special Port and select your order.
I did, I entered the port at sector 0 and I don't see anything of any stuff I supposed to have bought.
Do I need to delete all the files and start again?
- TheMightyDude
- Site Admin
- Posts: 311
- Joined: Thu Apr 17, 2014 09:15 UTC
Re: Unable to buy anything from any special port.
Can we have the following server information:
But yours looks like it might be a PHP Session issue, try looking at the apache logs, and also creating a blank file named "dev" in the BNT folder, re-create the universe and try again.
BNT also uses PHP Sessions when doing stuff like buying stuff at the ports, scanning, attacking a ship or planet, this is to reduce abuse on the server.
- OS and version
- Apache Version
- MySQL Version
- PHP Version
- BNT Version
But yours looks like it might be a PHP Session issue, try looking at the apache logs, and also creating a blank file named "dev" in the BNT folder, re-create the universe and try again.
BNT also uses PHP Sessions when doing stuff like buying stuff at the ports, scanning, attacking a ship or planet, this is to reduce abuse on the server.
Re: Unable to buy anything from any special port.
OK, this is my server set up:-
Machine = Dell PowerEdge T710
CPU = 2xXeon E5530 CPU's = 8 Physical cores and 8 logical cores, totaling 16 cores.
RAM = 64GB
8x1TB HD's as raid 5
OS = Headless Ubuntu 18.04.4 LTS
Apache 2.4.43
MySQL 5.7.30-0ubuntu0.18.04.1
PHP v5.6 (BNT doesn't work on anything higher that 5.6), I do have multiple PHP versions installed and I wrote a bash script to easily switch versions if I need to.
BNT = v0.663 obtained from Soureforge https://sourceforge.net/projects/blacknova/
I'm not running it from localhost, it's running on my home server and I'm using a DYDNS host name from noip.
And I get an error 500 if I try to run BNT on any version of PHP higher then 5.6
The Apache error logs show nothing, and the Apache access.log only shows codes 200 for get and post from and to various php scripts, but no errors, and no errors in php.log either, very strange huh?
This is the error log when running under PHP 7.3:-
I assume to re-create the universe, I would drop and re-create the DB, then re-run index.php?
ADDENDUM
I have setup a temporary player, and I set the startup credits to 10M, login using the below details, then click on the port in sector 0, then try and buy an engine or a hull, you should see that red error along the top.
URL = http://home-regions.no-ip.org/traders
Login = nobody@nowhere.com
Passwd = fixmyerrors
Machine = Dell PowerEdge T710
CPU = 2xXeon E5530 CPU's = 8 Physical cores and 8 logical cores, totaling 16 cores.
RAM = 64GB
8x1TB HD's as raid 5
OS = Headless Ubuntu 18.04.4 LTS
Apache 2.4.43
MySQL 5.7.30-0ubuntu0.18.04.1
PHP v5.6 (BNT doesn't work on anything higher that 5.6), I do have multiple PHP versions installed and I wrote a bash script to easily switch versions if I need to.
BNT = v0.663 obtained from Soureforge https://sourceforge.net/projects/blacknova/
I'm not running it from localhost, it's running on my home server and I'm using a DYDNS host name from noip.
And I get an error 500 if I try to run BNT on any version of PHP higher then 5.6
The Apache error logs show nothing, and the Apache access.log only shows codes 200 for get and post from and to various php scripts, but no errors, and no errors in php.log either, very strange huh?
This is the error log when running under PHP 7.3:-
Code: Select all
[Wed May 20 01:37:44.404790 2020] [mpm_prefork:notice] [pid 5341] AH00169: caught SIGTERM, shutting down
[Wed May 20 01:37:44.556449 2020] [mpm_prefork:notice] [pid 9291] AH00163: Apache/2.4.43 (Ubuntu) configured -- resuming normal operations
[Wed May 20 01:37:44.556527 2020] [core:notice] [pid 9291] AH00094: Command line: '/usr/sbin/apache2'
[Wed May 20 01:38:01.759693 2020] [php7:error] [pid 9299] [client 65.103.212.18:54392] PHP Parse error: syntax error, unexpected '[', expecting ',' or ';' in /var/www/bnt/includes/load_languages.php on line 42, referer: http://home-regions.no-ip.org/traders/port2.php
ADDENDUM
I have setup a temporary player, and I set the startup credits to 10M, login using the below details, then click on the port in sector 0, then try and buy an engine or a hull, you should see that red error along the top.
URL = http://home-regions.no-ip.org/traders
Login = nobody@nowhere.com
Passwd = fixmyerrors
- TheMightyDude
- Site Admin
- Posts: 311
- Joined: Thu Apr 17, 2014 09:15 UTC
Re: Unable to buy anything from any special port.
Well BNT does work PHP 7.2.x but you have to change stuff in the code.
I will download that version and see what is happening.
I will get back once I find out what the issue is.
I will download that version and see what is happening.
I will get back once I find out what the issue is.
- TheMightyDude
- Site Admin
- Posts: 311
- Joined: Thu Apr 17, 2014 09:15 UTC
Re: Unable to buy anything from any special port.
Ok, I was right in it being a Session Issue.
It was failing to create the Sessions table in the database.
I have updated ADOdb Backend to the latest version v5.20.16 12-Jan-2020 which will work on PHP 7.2.x
Now although I have this working on PHP 7.2.x you will need to test it yourself due to I haven't the time to test everything.
But the universe creates and I was able to buy stuff from the special ports.
But due to it is old code and using the new ADOdb code, you might have issues running it on PHP 5.6, but you could just try it.
I am also saying there might be loads more of issues unknown.
Try this version: bnt-0.663b.zip make a backup of your existing files and then unzip this file and overwrite the current files and re-set the config settings etc.
Let me know if it works or not.
It was failing to create the Sessions table in the database.
I have updated ADOdb Backend to the latest version v5.20.16 12-Jan-2020 which will work on PHP 7.2.x
Now although I have this working on PHP 7.2.x you will need to test it yourself due to I haven't the time to test everything.
But the universe creates and I was able to buy stuff from the special ports.
But due to it is old code and using the new ADOdb code, you might have issues running it on PHP 5.6, but you could just try it.
I am also saying there might be loads more of issues unknown.
Try this version: bnt-0.663b.zip make a backup of your existing files and then unzip this file and overwrite the current files and re-set the config settings etc.
Let me know if it works or not.
Re: Unable to buy anything from any special port.
I'm afraid not, I get this at the top now:-
Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /var/www/bnt/backends/adodb/drivers/adodb-mysql.inc.php on line 480
And I still get that red line at the top underneath the error:-
Your last Sales Transaction has already been delivered, Please enter the Special Port and select your order.
Also the logout now takes about 5 minutes with the white circle on the tab rotating constantly for about 5 minutes.
ADDENDUM
I fixed it,,, when I copied the new files over it some how didn't overwrite db_config.php, it works now, I had to manually copy that file over.
But I still get that red error about the last transaction.
2 new notices:-
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
and that was when I logged out.
Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /var/www/bnt/backends/adodb/drivers/adodb-mysql.inc.php on line 480
And I still get that red line at the top underneath the error:-
Your last Sales Transaction has already been delivered, Please enter the Special Port and select your order.
Also the logout now takes about 5 minutes with the white circle on the tab rotating constantly for about 5 minutes.
ADDENDUM
I fixed it,,, when I copied the new files over it some how didn't overwrite db_config.php, it works now, I had to manually copy that file over.
But I still get that red error about the last transaction.
2 new notices:-
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
and that was when I logged out.
- TheMightyDude
- Site Admin
- Posts: 311
- Joined: Thu Apr 17, 2014 09:15 UTC
Re: Unable to buy anything from any special port.
You cannot use persistent connections, I think that's been broken for ages, so set $db_persistent = 0;
You also have to use "mysqli" for the driver, so set $ADODB_SESSION_DRIVER = "mysqli";
Once changed, re-create the universe and try again it should work due to I tested on the following:
PHP 7.2.24
Apache/2.4.29
MySQL 5.7.30
So I don't know what you are changing that is breaking it.
You also have to use "mysqli" for the driver, so set $ADODB_SESSION_DRIVER = "mysqli";
Once changed, re-create the universe and try again it should work due to I tested on the following:
PHP 7.2.24
Apache/2.4.29
MySQL 5.7.30
So I don't know what you are changing that is breaking it.
- TheMightyDude
- Site Admin
- Posts: 311
- Joined: Thu Apr 17, 2014 09:15 UTC
Re: Unable to buy anything from any special port.
One sec, will look into the gen score issue.
Re: Unable to buy anything from any special port.
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.
Code: Select all
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Dropping Tables
Dropping all tables Passed
Hover over the failed line to see the error.
Dropping stage complete.
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /var/www/bnt/backends/adodb/adodb-perf.inc.php on line 170
- TheMightyDude
- Site Admin
- Posts: 311
- Joined: Thu Apr 17, 2014 09:15 UTC
Re: Unable to buy anything from any special port.
Ok, in includes/connectdb.php add the following line to line 61:
So it looks like the following lines:
You shouldn't need to re-create the universe.
Code: Select all
$db->Execute ("SET SESSION sql_mode = 'STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION';");
Code: Select all
if ( ($db instanceof ADOConnection) && (is_resource($db->_connectionID) || is_object($db->_connectionID)) )
{
// Set our character set to utf-8
$db->Execute("SET NAMES 'utf8'");
$db->Execute ("SET SESSION sql_mode = 'STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION';");
// Yes we connected ok, so return true.
return true;
}