Stock arcade games not saving high scores or history

FYI I don't have xenporta installed.

I was able to run xFArcade fine on my test system and works correctly, but when I installed it on my live system, the high scores aren't being registered. When a game ends, such as "asteroids", it says it is "transmitting information", but stays on that screen, all the stock games have this behavior, but I don't have the problem on my test system.

The only difference between the two systems is that the test system is using Apache web server, and the live system is using nginx. It doesn't appear to be anything specific to the syle I'm using, as even the default xenforo theme has the problem.

There is nothing logged to the error file, usergroup permissions are set correctly.
 
I'm wondering how the score saving is happening, is it with a redirect or something? I wonder if I have an nginx rewrite that is interfering or something, but if that was the case, I probably wouldn't be able to even play the arcade. I'll snoop around.

I noticed that although I've started playing a few games, and even if I'm in the middle of one, the xf_arcade_session table and xf_arcade_game_play tables are empty. I assume there should be an entry(ies) for the attempts of the games I've played?
 
Well, I don't know what's going on, but I copied an ipb game from a vbulletin installation I used to have, and imported it into my xFArcade system. It works perfectly, saving the score and high score.

But the stock "core" games wont' save the scores. So it must have something to do with the core games?

I verified the permissions on the game files, thinking that might have caused the problem, but the permissions, and user/group are the same between the game I created, and the core games.
 
FYI, if I play a core .swf game from the browser, and it ends, nothing happens, so I don't think it's trying to POST anything. Maybe when it's running in the xf shell it's supposed to tell the swf file to POST somewhere?

When I play the game I installed from a prior vB installation, the swf file tries to post to this URL, which doesn't exist (but works when the game is played through xFArcade). This indicates to me that the base installation of the xf index.php file is getting set incorrectly, although I don't have a problem with my xF installation....
http://site.com/xfinstall/data/games/0/index.php?act=Arcade&do=newscore

This should probably be:
http://site.com/xfinstall/index.php?act=Arcade&do=newscore

For instance, I was able to replace the "core" Asteroids game with a slightly older version, and it works, but I don't know why my existing core games don't save scores.

Is there a relative path or something that is being used to tell where the score should be posted?
 
I think the problem has to do with what is being presented as the base_url or something similar that is supposed to POST the high score, due to the session not being created successfully in the table. I suspect it is a rewrite problem with nginx, but because my xf installation is running ok, I don't want to mess with too much of it.
 
Well, in trying to fix this, I added this to my nginx config so that it correctly rewrote the calls to things in the /xfinstall/data directory, which I don't think were getting rewritten when the .swf file was being played. The .swf files exists in the data/games directory.
Code:
location /xfinstall/data/ {
root  /blahblah/xfinstall;
internal;
}


But now I get this xF error when the Bejeweled game is trying to have it's score submitted, it LOOKS like the rewrite is working correctly now...

Code:
Server Error
Mysqli statement execute error : Data truncated for column 'score' at row 1
 
Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
Zend_Db_Adapter_Abstract->insert() in Arcade/Model/Session.php at line 11
Arcade_Model_Session->saveSession() in Arcade/ControllerPublic/ArcadeUgly.php at line 227
Arcade_ControllerPublic_ArcadeUgly->actionIpbSaveScore() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /blahblah/xfinstall/index.php at line 13


this is the debug trace, looks like the gscore and aracdegid isn't getting set?
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Data truncated for column 'score' at row 1 - library/Zend/Db/Statement/Mysqli.php:214
#0 /xxxxx/library/Zend/Db/Statement.php(317): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /xxxxx/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /xxxxx/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
#3 /xxxxx/library/Arcade/Model/Session.php(11): Zend_Db_Adapter_Abstract->insert('xf_arcade_sessi...', Array)
#4 /xxxxx/library/Arcade/ControllerPublic/ArcadeUgly.php(227): Arcade_Model_Session->saveSession(Array, Array, Array)
#5 /xxxxx/library/XenForo/FrontController.php(310): Arcade_ControllerPublic_ArcadeUgly->actionIpbSaveScore()
#6 /xxxxx/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#7 /xxxxx/index.php(13): XenForo_FrontController->run()
#8 {main}
Request State
array(3) {
["url"] => string(69) "http://xxxxx/index.php?autocom=arcade&do=savescore"
["_GET"] => array(2) {
["autocom"] => string(6) "arcade"
["do"] => string(9) "savescore"
}
["_POST"] => array(4) {
["enscore"] => string(2) "25"
["gname"] => string(9) "bejeweled"
["gscore"] => string(0) ""
["arcadegid"] => string(0) ""
}
}
 
Tried that out, but it broke the entire xF installation. The closest I've came is the addition of a "location" for the data directory, the correct controller is called in index.php, but the sqli error tells me that it doesn't like what I'm trying to insert for the score.

Again, for whatever reason, I was able to replace the "core" versions of the games with the (identical?) games from my vB installation, and they work fine, except for bejeweled, as it is for ipb32 or something or other, and mine were all from ibproarcade or similar.
 
Thanks for your help with getting my nginx configuration straightened out ChemicalKicks, I was able to get the "core" games working, except for Bejeweled, the score tries to submit, but I still get this error:
Server Error
Mysqli statement execute error : Data truncated for column 'score' at row 1
  1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
  2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
  3. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
  4. Zend_Db_Adapter_Abstract->insert() in Arcade/Model/Session.php at line 11
  5. Arcade_Model_Session->saveSession() in Arcade/ControllerPublic/ArcadeUgly.php at line 227
  6. Arcade_ControllerPublic_ArcadeUgly->actionIpbSaveScore() in XenForo/FrontController.php at line 310
  7. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  8. XenForo_FrontController->run() in /blah/blah/index.php at line 13

Although this error still occurs, it does try to save the scores when games are ended, the main fix for that issue is to make sure there's a try_files in the PHP processing section of nginx (line 3):
Code:
    #PHP
    location ~ \.php$ {
      try_files $uri /xfinstall/index.php =404;
      include /etc/nginx/fastcgi_params;
      fastcgi_pass  127.0.0.1:9000;
      fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    }
 
Back
Top