Plans to go open source

short notes for those not reading all the forums
User avatar
Isles487
Sr. Member
Posts: 1124
Joined: Sat Jul 27, 2013 6:10 pm

Re: Plans to go open source

Postby Isles487 » Fri Jan 24, 2020 1:41 am

Thanks for that info. I was able to compile and run both servers. The only issue I have is I'm stuck at the main login screen. Whether I try to make a new user name or type in an existing one, I keep getting that error in Japanese that says "A communication error occurred. Please reconnect once more."
Possibly a problem with mysql. Did you run the sql script to make sure you've initialized the database? Have you made sure the properties file contains the correct username and password to connect to sql?

If you've done that, please run

Code: Select all

systemctl status mysql
.

and

Code: Select all

sudo ss -nltp | grep mysql
I've triple checked the username and password in the config file and it's good. I'm assuming the server IP address has to be exactly the same as the virtual machine's IP address. I just can't get past the login page.
1) Can you please run the commands I posted and give me the output?

2) Did you run the SQL script "bioserver.sql?" Because the user name and password in that file is what needs to be set in the properties file. I see that the pdf suggests creating the bioserver user, but the issue is, is that running the bioserver.sql file would've already created that user with the password "xxxxxxxxxxxxxxxx" So try that password in the config.properties file instead.
Image

refan988
Full Member
Posts: 136
Joined: Wed Jul 10, 2013 6:45 pm

Re: Plans to go open source

Postby refan988 » Fri Jan 24, 2020 1:49 am



Possibly a problem with mysql. Did you run the sql script to make sure you've initialized the database? Have you made sure the properties file contains the correct username and password to connect to sql?

If you've done that, please run

Code: Select all

systemctl status mysql
.

and

Code: Select all

sudo ss -nltp | grep mysql
I've triple checked the username and password in the config file and it's good. I'm assuming the server IP address has to be exactly the same as the virtual machine's IP address. I just can't get past the login page.
1) Can you please run the commands I posted and give me the output?

2) Did you run the SQL script "bioserver.sql?" Because the user name and password in that file is what needs to be set in the properties file. I see that the pdf suggests creating the bioserver user, but the issue is, is that running the bioserver.sql file would've already created that user with the password "xxxxxxxxxxxxxxxx" So try that password in the config.properties file instead.
There is no bioserver.sql file from gitlab in either file 1 or file 2 server files as far as I know.

User avatar
Isles487
Sr. Member
Posts: 1124
Joined: Sat Jul 27, 2013 6:10 pm

Re: Plans to go open source

Postby Isles487 » Fri Jan 24, 2020 1:52 am



I've triple checked the username and password in the config file and it's good. I'm assuming the server IP address has to be exactly the same as the virtual machine's IP address. I just can't get past the login page.
1) Can you please run the commands I posted and give me the output?

2) Did you run the SQL script "bioserver.sql?" Because the user name and password in that file is what needs to be set in the properties file. I see that the pdf suggests creating the bioserver user, but the issue is, is that running the bioserver.sql file would've already created that user with the password "xxxxxxxxxxxxxxxx" So try that password in the config.properties file instead.
There is no bioserver.sql file from gitlab in either file 1 or file 2 server files as far as I know.
I've taken another look - there's actually 2 places where the server will need the credentials to connect to mysql:

1) In the config.properties file, and
2) In /var/www/bhfof1 (or 2, depending on which Outbreak server you are working on) - the file name is db_cred.php. You need to make sure that the username and password match the bioserver.sql - that file is located in the "database" folder.

Basically if you followed the PDF instructions verbatim without editing the bioserver.sql file, the username is going to be 'bioserver' and the password is going to be 'xxxxxxxxxxxxxxxx'
Image

refan988
Full Member
Posts: 136
Joined: Wed Jul 10, 2013 6:45 pm

Re: Plans to go open source

Postby refan988 » Fri Jan 24, 2020 2:00 am

I know, I extensively edited that db_cred.php file and nothing works. Here are those commands:
https://ibb.co/H7zLty6
https://ibb.co/LPShSfF
My bad, the database files did exists and I did edit them to match the username and password.

User avatar
Isles487
Sr. Member
Posts: 1124
Joined: Sat Jul 27, 2013 6:10 pm

Re: Plans to go open source

Postby Isles487 » Fri Jan 24, 2020 2:11 am

I know, I extensively edited that db_cred.php file and nothing works. Here are those commands:
https://ibb.co/H7zLty6
https://ibb.co/LPShSfF
My bad, the database files did exists and I did edit them to match the username and password.
Did you run "sudo mysql -u root < database/bioserver.sql"?

We're going to change the password to make sure it matches what you want.

Run the commands

Code: Select all

sudo mysql -u root bioserver ALTER USER 'bioserver'@'localhost' IDENTIFIED BY 'xxxxxxxxxxxxxxxx'; exit
Change the string of x to be the password you'd like.
Image

refan988
Full Member
Posts: 136
Joined: Wed Jul 10, 2013 6:45 pm

Re: Plans to go open source

Postby refan988 » Fri Jan 24, 2020 2:22 am

I thought the username had to be bioserver@% instead of bioserver@localhost for remote hosts to be able to connect to it. I set the pass to admin and I can use that to login to both databases bioserver and bioserver2. Could I send you my virtualbox vdi file at the snapshot where I just got the dnas server working?

refan988
Full Member
Posts: 136
Joined: Wed Jul 10, 2013 6:45 pm

Re: Plans to go open source

Postby refan988 » Fri Jan 24, 2020 2:29 am

Never mind about the Virtualbox image it's almost 7gb.

User avatar
Isles487
Sr. Member
Posts: 1124
Joined: Sat Jul 27, 2013 6:10 pm

Re: Plans to go open source

Postby Isles487 » Fri Jan 24, 2020 2:34 am

I thought the username had to be bioserver@% instead of bioserver@localhost for remote hosts to be able to connect to it. I set the pass to admin and I can use that to login to both databases bioserver and bioserver2. Could I send you my virtualbox vdi file at the snapshot where I just got the dnas server working?
EDIT: Yeah, change it for both of them.
Image

User avatar
Isles487
Sr. Member
Posts: 1124
Joined: Sat Jul 27, 2013 6:10 pm

Re: Plans to go open source

Postby Isles487 » Fri Jan 24, 2020 2:36 am

If this is failing, there should be some logs in apache. Can you post the output of the logs in /var/log/apache?
Image

refan988
Full Member
Posts: 136
Joined: Wed Jul 10, 2013 6:45 pm

Re: Plans to go open source

Postby refan988 » Fri Jan 24, 2020 2:46 am

If this is failing, there should be some logs in apache. Can you post the output of the logs in /var/log/apache?
Nothing in /var/log/apache, but the logs were in /opt/apache/logs. Here's the link: https://drive.google.com/file/d/1nMolHb ... 63cba/view

User avatar
Isles487
Sr. Member
Posts: 1124
Joined: Sat Jul 27, 2013 6:10 pm

Re: Plans to go open source

Postby Isles487 » Fri Jan 24, 2020 3:01 am

Think this is the issue here:

Code: Select all

Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /var/www/bhof2/db_cred.php:7\nStack trace:\n#0 /var/www/bhof2/login_form.php(5): require_once()\n#1 {main}\n thrown in /var/www/bhof2/db_cred.php on line 7\n', referer: https://www01.kddi-mmbb.jp/00000010/login.php
Now it becomes clear to me why the PDF refers to this at the end. mysql_* functions are entirely removed in PHP7.

https://stackoverflow.com/questions/138 ... ql-connect

Options are to either install older php5 (having to compile if not in repos), changing the functions to newer supported functions, or trying a solution like the one suggested in this answer: https://stackoverflow.com/a/37877644

PHP5 is in the Jessie repos. It may be possible to install from there - or maybe install Jessie as the base OS in your VM.
Image

refan988
Full Member
Posts: 136
Joined: Wed Jul 10, 2013 6:45 pm

Re: Plans to go open source

Postby refan988 » Fri Jan 24, 2020 9:44 am

Think this is the issue here:

Code: Select all

Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /var/www/bhof2/db_cred.php:7\nStack trace:\n#0 /var/www/bhof2/login_form.php(5): require_once()\n#1 {main}\n thrown in /var/www/bhof2/db_cred.php on line 7\n', referer: https://www01.kddi-mmbb.jp/00000010/login.php
Now it becomes clear to me why the PDF refers to this at the end. mysql_* functions are entirely removed in PHP7.

https://stackoverflow.com/questions/138 ... ql-connect

Options are to either install older php5 (having to compile if not in repos), changing the functions to newer supported functions, or trying a solution like the one suggested in this answer: https://stackoverflow.com/a/37877644

PHP5 is in the Jessie repos. It may be possible to install from there - or maybe install Jessie as the base OS in your VM.
I finally got it working by installing php5.6-mysql and php5.6-fpm after following this guide at the "Install PHP5.6" section. I also edited the /opt/apache/conf/httpd.conf file so that the server configuration file at the end says SetHandler "proxy:unix:/var/run/php/php5.6-fpm.sock. Unfortunately neither server seems to work. Whenever I start a game, whether solo or with another player, it doesn't load the game, just hangs for a bit then brings me back to lobby menu.

User avatar
Isles487
Sr. Member
Posts: 1124
Joined: Sat Jul 27, 2013 6:10 pm

Re: Plans to go open source

Postby Isles487 » Sat Jan 25, 2020 2:11 am

The lobby server sends a packet to the clients containing the IP for the game server. It sounds to me as if the wrong IP is getting through. Can you verify that the config.properties IP points to your VM IP? Also, post the output of:

Code: Select all

sudo ss -ntp
so I can verify that the server opened the port.
Image

refan988
Full Member
Posts: 136
Joined: Wed Jul 10, 2013 6:45 pm

Re: Plans to go open source

Postby refan988 » Sat Jan 25, 2020 2:23 am

You were right it was the config file. I accidentally put in 192.168.1.233 when it was supposed to be 192.168.1.223. Seems to load the scenarios now. I feel so silly I overlooked this. Would you mind if I post my Virtualbox OVA file, if someone wanted to try it fully set up?

User avatar
hill73n
Full Member
Posts: 141
Joined: Mon May 20, 2019 4:49 am
Location: Australia

Re: Plans to go open source

Postby hill73n » Sat Jan 25, 2020 12:26 pm

You were right it was the config file. I accidentally put in 192.168.1.233 when it was supposed to be 192.168.1.223. Seems to load the scenarios now. I feel so silly I overlooked this. Would you mind if I post my Virtualbox OVA file, if someone wanted to try it fully set up?
Will have to have a go at this one of these days...but i'll be starting from scratch on the server learning curve...lol


Return to “News”



Who is online

Users browsing this forum: No registered users and 9 guests

cron