Forum > Own statistics server: "Connection to Master Server Failed"

DACliff
Joined: Mar 11
2011-03-20, 23:23
Hello there.

I've tried setting up my own stat server and everything, using PazaakCantina v2 as well.

Tried setting up an account today and when I hit "create" I get teh following message:

"Connection os Master server faield" I am not sure where the problem might be, or perhaps I am doing something wrong.

Appreciate some help if possible :)

DarthRevan
Joined: Nov 09
2011-03-21, 13:04
Try to test your server.php file with opening it in a browser.
It should say only "Pazaak Cantina Online Server v1.2.0.0".
Developer of Pazaak Cantina.
Definition: 'Love' is making a shot to the knees of a target 120 kilometers away using an Aratech sniper rifle with a tri-light scope (HK-47)

DACliff
Joined: Mar 11
2011-03-21, 17:03
Yes I have tested the server.php before and after my editing.
Before I edited the message showed as you described but after I've editted it, it seems it's gone and I am unable to connect to it. What annoys me the most is the fact that server, username, pass etc I've typed in are correct unless my provider isn't giving me the complete link?

DACliff
Joined: Mar 11
2011-03-21, 17:15
(Double post)

DarthRevan
Joined: Nov 09
2011-03-21, 18:24
Did you create the two MySQL tables (see Readme.txt in the file archive for details)?
Developer of Pazaak Cantina.
Definition: 'Love' is making a shot to the knees of a target 120 kilometers away using an Aratech sniper rifle with a tri-light scope (HK-47)

DACliff
Joined: Mar 11
2011-03-21, 18:35
yes both tables were created but still not working I'm afraid :)

DarthRevan
Joined: Nov 09
2011-03-21, 22:47
The problem is presumably the on the server side, because when opened in a web browser, the script doesn't show "Pazaak Cantina Online Server v1.2.0.0".
You said, that when you don't change the server.php file, the above text is shown?
Did you change any variables in the extended config section?
Developer of Pazaak Cantina.
Definition: 'Love' is making a shot to the knees of a target 120 kilometers away using an Aratech sniper rifle with a tri-light scope (HK-47)

DACliff
Joined: Mar 11
2011-03-22, 06:52
yes that is correct.

Uploading it to my site I could click into server.php and see the text as shown, but once I changed things on the config and only that, it doesn't appear.
The extended config you're talking about I didn't change anything there either, should I do that as well or leave it as it is? Because I do see that the patches noted on the server extended config of the server.php didn't actually match with the download update on this site.

Again I didn't change anything on that config yet :)

DarthRevan
Joined: Nov 09
2011-03-22, 10:52
You should leave the extended config as it is.
I cannot figure out why changing the variables in the config section breaks the script.. Perhaps there are some quotation marks in one of the variables (e.g. password) which breaks the script?`

Unfortunately I cannot reproduce this error :(
Maybe it is related to the server software (php, mysql, apache etc).
Developer of Pazaak Cantina.
Definition: 'Love' is making a shot to the knees of a target 120 kilometers away using an Aratech sniper rifle with a tri-light scope (HK-47)

DACliff
Joined: Mar 11
2011-03-22, 14:23
Well I've contacted my webhost provider and they did a test.
This is what came out of it from testing the directory:

Parse error: syntax error, unexpected '"' .........../Pazaak/server.php on line 131

Did this information help in some way?

DarthRevan
Joined: Nov 09
2011-03-22, 19:52
The problem is definitely the php module.
Which version of php are you using? Maybe an update would help.

Line 131 is syntactically correct. But you can try to replace line 131 and line 132 with these two lines:

$xml .= "n <Game IP=".'"'.$row['IP'].'" Port="'.$row['Port'].'" ServerName="'.$row['ServerName'].
'" HostWins="'.$row['HostWins'].'" ClientWins="'.$row['ClientWins'].'" GameType="'.$row['GameType'].'" />';

The above is an alternative syntax which is maybe more compatible with older php versions.
Developer of Pazaak Cantina.
Definition: 'Love' is making a shot to the knees of a target 120 kilometers away using an Aratech sniper rifle with a tri-light scope (HK-47)

DACliff
Joined: Mar 11
2011-03-22, 20:17
that seemed to fix the probelm the tag now shows itself on the page and I am able to create my account :D

DACliff
Joined: Mar 11
2011-03-22, 20:27
It seems I spoke too soon.
I am now able to create an account, but loging in or editting that account is not possible as I seem to get "Master server error" when doing so.

Nothing seems to be easy for me it seems :P

DarthRevan
Joined: Nov 09
2011-03-22, 21:19
It's highly probable that your server's php version is too old or php is configured in a strange way. What version of php are you using?
Developer of Pazaak Cantina.
Definition: 'Love' is making a shot to the knees of a target 120 kilometers away using an Aratech sniper rifle with a tri-light scope (HK-47)

DACliff
Joined: Mar 11
2011-03-22, 21:30
By checking my provider I discovered that my PHP Version is 4.4.9

DarthRevan
Joined: Nov 09
2011-03-23, 10:01
Oh well^^
Your php version is from 2008..
At least, you should use php 5, preferably 5.3 or later!
Developer of Pazaak Cantina.
Definition: 'Love' is making a shot to the knees of a target 120 kilometers away using an Aratech sniper rifle with a tri-light scope (HK-47)

DACliff
Joined: Mar 11
2011-03-23, 12:27
Making alot of misstakes here i seems.

Hm seems they haven't updated their link as this was old information they gave me, second mail show my php version is at 5.2.14

I am not sure if that was any better then the last but I am still eager in getting this to work propperly, if you're still willing to help me :)

DarthRevan
Joined: Nov 09
2011-03-23, 15:32
Version 5.2.x should be fine. Does an error occur in the log files? In which line does it occur?
Developer of Pazaak Cantina.
Definition: 'Love' is making a shot to the knees of a target 120 kilometers away using an Aratech sniper rifle with a tri-light scope (HK-47)

DACliff
Joined: Mar 11
2011-03-23, 16:34
turned debug on and this is the error message I receive:

Error 2 mysql_connect(): Lost connection to MySQL server at 'reading initial communication packet', system error: 111rnrnMySQL State:rnLost connectio

doesn't seem like I am getting connection for some reason...

DACliff
Joined: Mar 11
2011-03-24, 16:38
Here's another fault that has accured today:

Parse error: syntax error, unexpected T_STRING in ...../Pazaak/server.php on line 30

DarthRevan
Joined: Nov 09
2011-03-24, 21:52
The MySQL error is server related.

Line 30 on the script is
$debug_file = 'debug.txt';
which is absolutely valid. Therefore, if nothing has been changed, the error is also server related.
Developer of Pazaak Cantina.
Definition: 'Love' is making a shot to the knees of a target 120 kilometers away using an Aratech sniper rifle with a tri-light scope (HK-47)

DarthRevan
Joined: Nov 09
2011-03-24, 21:56
My advice is:
Setup a test system with XAMPP on your local PC. The script should work fine.
Then, try to get the latest version for the script execution programs on your server (PHP, MySQL and the webserver e.g. Apache).
Developer of Pazaak Cantina.
Definition: 'Love' is making a shot to the knees of a target 120 kilometers away using an Aratech sniper rifle with a tri-light scope (HK-47)