[solved] Aseco batch file php error

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

sebasdt
pedestrian
pedestrian
Posts: 11
Joined: 25 Dec 2020 09:34
Owned TM-games: tmf

[solved] Aseco batch file php error

Post by sebasdt » 25 Dec 2020 09:58

hello, tm forum,

this week I had the idea of setting up a dedicated Trackmania server for Trackmania nations forever.
(this is the first-ever time I have set up a tmf server)
At first, I followed this guide viewtopic.php?t=14203 and it worked good enough no issues what so ever.
Then I wanted to control the server with the command lines and add some plugins if needed.
here is where the real unknown begins.
i have followed this video https://youtu.be/NkvjJicAFsc which is based on http://www.gamers.org/tmf/quickstart.html
everything that needed to change has been changed.

until i executed Aseco.bat i got the following fatal error:

Code: Select all

[XAseco] Load settings [config.xml]
PHP Fatal error:  Uncaught Error: Call to a member function parseXml() on null in C:\Users\sebasdt\Desktop\server\xaseco\aseco.php:220
Stack trace:
#0 C:\Users\sebasdt\Desktop\server\xaseco\aseco.php(697): Aseco->loadSettings('config.xml')
#1 C:\Users\sebasdt\Desktop\server\xaseco\aseco.php(2561): Aseco->run('config.xml')
#2 {main}
  thrown in C:\Users\sebasdt\Desktop\server\xaseco\aseco.php on line 220

Fatal error: Uncaught Error: Call to a member function parseXml() on null in C:\Users\sebasdt\Desktop\server\xaseco\aseco.php:220
Stack trace:
#0 C:\Users\sebasdt\Desktop\server\xaseco\aseco.php(697): Aseco->loadSettings('config.xml')
#1 C:\Users\sebasdt\Desktop\server\xaseco\aseco.php(2561): Aseco->run('config.xml')
#2 {main}
  thrown in C:\Users\sebasdt\Desktop\server\xaseco\aseco.php on line 220
Press any key to continue . . .
I also have run the file as an administrator, I got the following error:

Code: Select all

Could not open input file: aseco.php
Press any key to continue . . .
what could be the mistake i have made?
if there are any things unclear, just ask.
Last edited by sebasdt on 31 Dec 2020 11:58, edited 2 times in total.

User avatar
undef.de
Pit Crew
Pit Crew
Posts: 1365
Joined: 31 Aug 2009 18:38
Owned TM-games: TMF, TM2C/S/V, SM
Manialink(s): undef, tmkarma
Location: Germany
Contact:

Re: Aseco batch file php error

Post by undef.de » 25 Dec 2020 18:17

Add

Code: Select all

extension=php_xmlrpc.dll
to your used php.ini :thumbsup:
Developer of various plugins for XAseco/XAseco2 and MPAseco,
like Records-Eyepiece, TM-Karma, Alternate Scoretable...
Visit my Lab: www.undef.name

Get it now:
» TM2 Valley
» TM2 Canyon
» TM2 Stadium
» SM Storm

sebasdt
pedestrian
pedestrian
Posts: 11
Joined: 25 Dec 2020 09:34
Owned TM-games: tmf

Re: Aseco batch file php error

Post by sebasdt » 25 Dec 2020 21:36

Thank you for your reply.
undef.de wrote:
25 Dec 2020 18:17
Add

Code: Select all

extension=php_xmlrpc.dll
to your used php.ini :thumbsup:
i have added it to the xampp directory

Code: Select all

C:\xampp\php\php.ini
but that didn't fix it. the same fatal error was still there and a new error was present.

Code: Select all

PHP Warning:  PHP Startup: Unable to load dynamic library 'php_xmlrpc.dll' (tried: C:\xampp\php\ext\php_xmlrpc.dll (Cannot find specified module), C:\xampp\php\ext\php_php_xmlrpc.dll.dll (Cannot find specified module)) in Unknown on line 0
I think it couldn't find the library that is specified.

Also, I have been thinking that maybe the aseco.php couldn't find or open config.xml.

I don't know where the problem lies but the error is pointing to line 220 in aseco.php
maybe this could help?

Code: Select all

if ($settings = $this->xml_parser->parseXml($config_file, true, CONFIG_UTF8ENCODE)) { 

ttshunter
cyclist
cyclist
Posts: 30
Joined: 26 Dec 2020 16:49
Owned TM-games: TMUF

Re: Aseco batch file php error

Post by ttshunter » 26 Dec 2020 16:52

You don't need / may not add the ".dll" at the end.

Code: Select all

extension=php_xmlrpc

sebasdt
pedestrian
pedestrian
Posts: 11
Joined: 25 Dec 2020 09:34
Owned TM-games: tmf

Re: Aseco batch file php error

Post by sebasdt » 26 Dec 2020 18:48

Thank you.
I have tried that and still the same fault. Then I looked further where the file should be and surprise surprise: the php_xmlrpc.dll file wasn't there.
(followed C:\xampp\php\ext\php_xmlrpc.dll)
note: I'm using PHP 8.0.0.
could be there security issues going a few versions back? see if that could solve the problem.

ttshunter
cyclist
cyclist
Posts: 30
Joined: 26 Dec 2020 16:49
Owned TM-games: TMUF

Re: Aseco batch file php error

Post by ttshunter » 26 Dec 2020 21:01

You need to use an older PHP version, xaseco isn't even compatible with PHP 8.0.
Xaseco only works with PHP 5 out of the box, which is already EOL and hasn't received updates for a long time.

You can use PHP 7 for xaseco, but you'll need to use the Modernizer for it to work. PHP 7 is still getting updates, so there shouldn't be any security issues. And it's also a lot faster than PHP 5.

sebasdt
pedestrian
pedestrian
Posts: 11
Joined: 25 Dec 2020 09:34
Owned TM-games: tmf

Re: Aseco batch file php error

Post by sebasdt » 29 Dec 2020 12:29

Thank you for your reply,

In the past few days have been trying to get xaseco working with the modernizer. (and got a different fatal error)
Here is how far I got:
  • Deinstalled xampp 8.0.0 and installed xampp 7.2.34 (I couldn't find 7.0.XXX).

    Deleted the old xaseco map and unpacked xaseco (for a clean xaseco install).

    Changed the database and other files to how they should be configured, Based on the examples I have followed.
    (https://youtu.be/NkvjJicAFsc)

    Unpacked the modernized to the xaseco folder and followed how to configure this part.

    And finally started aseco.bat

so I got further than before.
here below came from the logfile:

Code: Select all

[XAseco] PHP Version is 7.2.34 on WINNT
[XAseco] Load settings [config.xml]
[PHP Warning] Illegal string offset 'TMLOGIN' on line 77 in file C:\Users\sebasdt\Desktop\server\xaseco\includes\xmlparser.inc.php
And here below is what the aseco.bat returned:

Code: Select all

# initialize XASECO ###########################################################
[XAseco] PHP Version is 7.2.34 on WINNT
[XAseco] Load settings [config.xml]
[PHP Warning] Illegal string offset 'TMLOGIN' on line 77 in file C:\Users\sebasdt\Desktop\server\xaseco\includes\xmlparser.inc.php
PHP Fatal error:  Uncaught Error: Cannot use string offset as an array in C:\Users\sebasdt\Desktop\server\xaseco\includes\xmlparser.inc.php:77
Stack trace:
#0 [internal function]: Examsly->closeTag(Resource id #15, 'TMLOGIN')
#1 C:\Users\sebasdt\Desktop\server\xaseco\includes\xmlparser.inc.php(44): xml_parse(Resource id #15, '<?xml version="...')
#2 C:\Users\sebasdt\Desktop\server\xaseco\aseco.php(221): Examsly->parseXml('config.xml', true, false)
#3 C:\Users\sebasdt\Desktop\server\xaseco\aseco.php(698): Aseco->loadSettings('config.xml')
#4 C:\Users\sebasdt\Desktop\server\xaseco\aseco.php(2562): Aseco->run('config.xml')
#5 {main}
  thrown in C:\Users\sebasdt\Desktop\server\xaseco\includes\xmlparser.inc.php on line 77

Fatal error: Uncaught Error: Cannot use string offset as an array in C:\Users\sebasdt\Desktop\server\xaseco\includes\xmlparser.inc.php:77
Stack trace:
#0 [internal function]: Examsly->closeTag(Resource id #15, 'TMLOGIN')
#1 C:\Users\sebasdt\Desktop\server\xaseco\includes\xmlparser.inc.php(44): xml_parse(Resource id #15, '<?xml version="...')
#2 C:\Users\sebasdt\Desktop\server\xaseco\aseco.php(221): Examsly->parseXml('config.xml', true, false)
#3 C:\Users\sebasdt\Desktop\server\xaseco\aseco.php(698): Aseco->loadSettings('config.xml')
#4 C:\Users\sebasdt\Desktop\server\xaseco\aseco.php(2562): Aseco->run('config.xml')
#5 {main}
  thrown in C:\Users\sebasdt\Desktop\server\xaseco\includes\xmlparser.inc.php on line 77
Press any key to continue . . .

ttshunter
cyclist
cyclist
Posts: 30
Joined: 26 Dec 2020 16:49
Owned TM-games: TMUF

Re: Aseco batch file php error

Post by ttshunter » 29 Dec 2020 13:07

That sounds like you haven't defined a MasterAdmin in the config.xml file. Make sure to put it outside of the comments.

sebasdt
pedestrian
pedestrian
Posts: 11
Joined: 25 Dec 2020 09:34
Owned TM-games: tmf

Re: Aseco batch file php error

Post by sebasdt » 29 Dec 2020 14:44

ttshunter wrote:
29 Dec 2020 13:07
That sounds like you haven't defined a MasterAdmin in the config.xml file. Make sure to put it outside of the comments.
here below is how defined the master admin in config.xml. didn't put a IP in because my IP changes constantly (I know, could set a static IP)
my account name is sebasdt1

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<settings>
  <aseco>
    <masteradmins>
      <tmlogin>sebasdt1</tmlogin> <ipaddress></ipaddress>
    </masteradmins>
Last edited by sebasdt on 29 Dec 2020 17:28, edited 1 time in total.

ttshunter
cyclist
cyclist
Posts: 30
Joined: 26 Dec 2020 16:49
Owned TM-games: TMUF

Re: Aseco batch file php error

Post by ttshunter » 29 Dec 2020 16:59

Could you try replacing your includes/xmlparser.inc.php file with the one I've attached to this post?
This was part of Bueddl's Patches, unfortunately the original Download link is down.
Edit: Why tf does the file upload not work :D
Edit2: Download link

sebasdt
pedestrian
pedestrian
Posts: 11
Joined: 25 Dec 2020 09:34
Owned TM-games: tmf

Re: Aseco batch file php error

Post by sebasdt » 29 Dec 2020 19:00

WOOW that was the fix for this part. it started up!
here is the logfile that was created:
I want to be sure if it has started up correctly.

Code: Select all

[XAseco] PHP Version is 7.2.34 on WINNT
[XAseco] Load settings [config.xml]
[XAseco] Load admin/ops lists [adminops.xml]
[XAseco] Load banned IPs list [bannedips.xml]
[XAseco] Load plugins list [plugins.xml]
[XAseco] Load plugin [plugin.localdatabase.php]
[XAseco] Load plugin [plugin.rounds.php]
[XAseco] Load plugin [chat.admin.php]
[XAseco] Load plugin [chat.help.php]
[XAseco] Load plugin [chat.records.php]
[XAseco] Load plugin [chat.records2.php]
[XAseco] Load plugin [chat.recrels.php]
[XAseco] Load plugin [chat.dedimania.php]
[XAseco] Load plugin [chat.players.php]
[XAseco] Load plugin [chat.players2.php]
[XAseco] Load plugin [chat.wins.php]
[XAseco] Load plugin [chat.laston.php]
[XAseco] Load plugin [chat.lastwin.php]
[XAseco] Load plugin [chat.stats.php]
[XAseco] Load plugin [chat.server.php]
[XAseco] Load plugin [chat.songmod.php]
[XAseco] Load plugin [chat.me.php]
[XAseco] Load plugin [plugin.tmxinfo.php]
[XAseco] Load plugin [plugin.track.php]
[XAseco] Load plugin [plugin.checkpoints.php]
[XAseco] Load plugin [plugin.dedimania.php]
[XAseco] Load plugin [plugin.rasp.php]
[XAseco] Load plugin [plugin.rasp_jukebox.php]
[XAseco] Load plugin [plugin.rasp_chat.php]
[XAseco] Load plugin [plugin.rasp_karma.php]
[XAseco] Load plugin [plugin.rasp_nextmap.php]
[XAseco] Load plugin [plugin.rasp_nextrank.php]
[XAseco] Load plugin [plugin.rasp_votes.php]
[XAseco] Load plugin [plugin.chatlog.php]
[XAseco] Load plugin [plugin.style.php]
[XAseco] Load plugin [plugin.panels.php]
[XAseco] Load plugin [plugin.uptodate.php]
[XAseco] Load plugin [jfreu.plugin.php]
[XAseco] Load plugin [mistral.idlekick.php]
[12/29,19:25:43] Try to connect to TM dedicated server on 127.0.0.1:5001 timeout 180s
[12/29,19:25:46] Try to authenticate with login 'SuperAdmin' and password 'xxxxxxx'
[12/29,19:25:46] Waiting for dedicated server to reach status 'Running - Play'...
[12/29,19:25:46] Status: Waiting
[12/29,19:25:47] Status: Launching
[12/29,19:25:48] Status: Running - Synchronization
[12/29,19:25:53] Status: Running - Play
[12/29,19:25:53] Connection established successfully !
[12/29,19:25:53] [LocalDB] Load config file [localdatabase.xml]
[12/29,19:25:53] [LocalDB] Try to connect to MySQL server on 'localhost' with database 'xaseco'
[12/29,19:25:53] [LocalDB] MySQL Server Version is 5.5.5-10.4.14-MariaDB
[12/29,19:25:53] [LocalDB] Checking database structure...
[12/29,19:25:53] [LocalDB] ...Structure OK!
[12/29,19:25:53] [RASP] Loading config file [rasp.xml]
[12/29,19:25:53] [RASP] Checking database structure...
[12/29,19:25:53] [RASP] ...Structure OK!
[12/29,19:25:53] [RASP] Cleaning up unused data
[12/29,19:25:53] Load default style [styles/DarkBlur.xml]
[12/29,19:25:53] Load default admin panel [panels/AdminBelowChat.xml]
[12/29,19:25:53] Load default donate panel [panels/DonateBelowCPList.xml]
[12/29,19:25:53] Load default records panel [panels/RecordsRightBottom.xml]
[12/29,19:25:53] Load default vote panel [panels/VoteBelowChat.xml]
[12/29,19:25:53] ************* (Dedimania) *************
[12/29,19:25:53] * Dataserver connection on Dedimania ...
[12/29,19:25:53] * Try connection on http://dedimania.net:8002/Dedimania ...
[12/29,19:25:53] Webaccess (dedimania.net:8002/Dedimania.8023): send: deflate, receive: deflate
[12/29,19:25:53] * Connection and status ok! (Dedimania.8023)
[12/29,19:25:53] * NEWS (Dedimania, 08/05): news
[12/29,19:25:53] ------------- (Dedimania) -------------
###############################################################################
  XASECO v1.16 running on 127.0.0.1:5001
  Name   : xxxxxxx - xxxxxxx
  Game   : TmForever Nations - Stadium - TimeAttack
  Version: 2.11.26 / 2011-02-21
  Authors: Florian Schnell & Assembler Maniac
  Re-Authored: Xymph
###############################################################################
Begin Challenge
[12/29,19:25:53] track changed [xxxxxxx] >> [xxxxxxx]
[12/29,19:25:53] currently no record on xxxxxxx
Begin Round
Begin Challenge
[12/29,19:25:53] track changed [xxxxxxx] >> [xxxxxxx]
[12/29,19:25:53] currently no record on xxxxxxx
I have 2 issues and one question left.

xaseco runs but where and how to i send commands to the server?

and hopefully last 2 issue:
when I try to join the server with my own tmnf account I got the following error:

The match was interrupted:
You were kicked.
(Obsolete client version, please upgrade.)
Returning to menus.

And upgrade had a hyperlink attached which directed me to:
viewtopic.php?p=139752#p139752

In the console the aseco server returned:

Code: Select all

 Obsolete admin client version 2.11.16 for sebasdt1 -- notified & kicked 
before i get kicked, the server name appears in the top left corner and says "server name"'left the game

í use steam to play tmnf

the last error:
When the Trackmania server changes to the next track this error pops up in the aseco consolev:

Code: Select all

[12/29,19:54:12] track changed [Verticale pijp] >> [Verticale pijp]
[12/29,19:54:12] currently no record on Verticale pijp
End Round
End Challenge
[12/29,19:54:22] [RASP] Calculating ranks...
PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function mysql_insert_id(), 0 passed in C:\Users\sebasdt\Desktop\server\xaseco\plugins\plugin.rasp.php on line 252 and exactly 1 expected in C:\Users\sebasdt\Desktop\server\xaseco\includes\modernizer.inc.php:100
Stack trace:
#0 C:\Users\sebasdt\Desktop\server\xaseco\plugins\plugin.rasp.php(252): mysql_insert_id()
#1 C:\Users\sebasdt\Desktop\server\xaseco\plugins\plugin.rasp.php(306): Rasp->getChallenges()
#2 C:\Users\sebasdt\Desktop\server\xaseco\plugins\plugin.rasp.php(618): Rasp->resetRanks()
#3 C:\Users\sebasdt\Desktop\server\xaseco\plugins\plugin.rasp.php(633): Rasp->onEndrace(Object(Aseco), Array)
#4 C:\Users\sebasdt\Desktop\server\xaseco\aseco.php(1249): event_endrace(Object(Aseco), Array)
#5 C:\Users\sebasdt\Desktop\server\xaseco\aseco.php(1602): Aseco->releaseEvent('onEndRace', Array)
#6 C:\Users\sebasdt\Desktop\server\xaseco\aseco.php(1090): Aseco->endRace(Array)
#7 C:\Users\sebasdt\Desktop\server\xaseco\aseco.php(760): A in C:\Users\sebasdt\Desktop\server\xaseco\includes\modernizer.inc.php on line 100

Fatal error: Uncaught ArgumentCountError: Too few arguments to function mysql_insert_id(), 0 passed in C:\Users\sebasdt\Desktop\server\xaseco\plugins\plugin.rasp.php on line 252 and exactly 1 expected in C:\Users\sebasdt\Desktop\server\xaseco\includes\modernizer.inc.php:100
Stack trace:
#0 C:\Users\sebasdt\Desktop\server\xaseco\plugins\plugin.rasp.php(252): mysql_insert_id()
#1 C:\Users\sebasdt\Desktop\server\xaseco\plugins\plugin.rasp.php(306): Rasp->getChallenges()
#2 C:\Users\sebasdt\Desktop\server\xaseco\plugins\plugin.rasp.php(618): Rasp->resetRanks()
#3 C:\Users\sebasdt\Desktop\server\xaseco\plugins\plugin.rasp.php(633): Rasp->onEndrace(Object(Aseco), Array)
#4 C:\Users\sebasdt\Desktop\server\xaseco\aseco.php(1249): event_endrace(Object(Aseco), Array)
#5 C:\Users\sebasdt\Desktop\server\xaseco\aseco.php(1602): Aseco->releaseEvent('onEndRace', Array)
#6 C:\Users\sebasdt\Desktop\server\xaseco\aseco.php(1090): Aseco->endRace(Array)
#7 C:\Users\sebasdt\Desktop\server\xaseco\aseco.php(760): A in C:\Users\sebasdt\Desktop\server\xaseco\includes\modernizer.inc.php on line 100
Press any key to continue . . .
Thank you all so so much for the help so far.
sorry for the long post but this is all i got for now.

ttshunter
cyclist
cyclist
Posts: 30
Joined: 26 Dec 2020 16:49
Owned TM-games: TMUF

Re: Aseco batch file php error

Post by ttshunter » 29 Dec 2020 19:39

You can interact with xaseco through chat commands, you can find a list of most commands here.

For some reason Nadeo never pushed the latest update (already 10 years old :roflol: ) to Steam, so you'll have to manually update it.

The error message in your console can be fixed by changing line 100 in the modernizer.inc.php from

Code: Select all

function mysql_insert_id($res){
to

Code: Select all

function mysql_insert_id($res = null){

sebasdt
pedestrian
pedestrian
Posts: 11
Joined: 25 Dec 2020 09:34
Owned TM-games: tmf

Re: Aseco batch file php error

Post by sebasdt » 29 Dec 2020 20:18

Ohhhhww snappers,

The server works like a treat so far as I could test it.


Nadeo has probably forgotten about that update :roflol: and the update fixed it

Are there any more things that need to add to the server? (plugins or addons)
like things that could make the server more fun?

two final questions:

Is there a command that would add a track to the server?
example: I have made a track and I would like to add it to the track settings without opening the track settings file. (i know you will need a track id)

Is there a command that would let the server decide at random what track comes next. (and not just follow the track settings list)

ttshunter
cyclist
cyclist
Posts: 30
Joined: 26 Dec 2020 16:49
Owned TM-games: TMUF

Re: Aseco batch file php error

Post by ttshunter » 29 Dec 2020 20:54

Choosing plugins is personal preference I guess, but the record eyepiece plugin for example is one of the most popular ones(especially because of the local & dedimania records panel).

If the track is on TMX, then you can add it with the command "/admin add <TMXID> <sec>" (sec can be tmnf, tmu or tmn, not needed in most cases though)
If you want to add a local track, there is the command "/admin addlocal <file_path>"

There is a setting(actually two, not sure what the difference is) in the matchsettings/tracklist file called "random_map_order", if this is set to 1 you can shuffle the whole tracklist with "/admin shuffle". Other than that there is no way to juke a random map afaik.

sebasdt
pedestrian
pedestrian
Posts: 11
Joined: 25 Dec 2020 09:34
Owned TM-games: tmf

Re: Aseco batch file php error

Post by sebasdt » 31 Dec 2020 11:58

Thank you all so so much for helping me and future people out!

The server is up and running and even some random dude joined, we had some fun racing!

Now i only need to test out kicking and all sorts of banning and see if that will work and not crash aseco.bat
and all of the other possible things!

Oky oky one LAST question:

how do new people who just joined the server skip a track?

Post Reply