php5.6/php7 compatibility + memleak fix

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

Moderators: Xymph, TM-Patrol

Bueddl
speedy pilot
speedy pilot
Posts: 461
Joined: 05 Apr 2008 12:37
Owned TM-games: TMO, TMS, TMU/N(F)
Location: Germany
Contact:

Re: php5.6/php7 compatibility + memleak fix

Post by Bueddl » 14 Feb 2017 00:00

Hi!

Glad to see, that changes are trickling down by time :-) The exact steps depend on what you want to archive.
If you only want to fix the memleak, you can go with the files I provided. I updated them and removed the GBX Data Fetcher as Xymph already merged the changes to version 2.9 which has been released recently (see update notice https://ftp.bueddl.de/tm/php7_patches/). It is better to obtain them from the original upstream source :-)

Second is, you'll have to deal with the removal of the old-style mysql API. Changes are described above and on the tiny site I put on the web. If you want a minimal effort solution, go with reabys plugin. Otherwise I suggest to perform the replacement of the procedural API with the object orientated one.

Cheers,

Bueddl

NoTimeToDrive
cyclist
cyclist
Posts: 39
Joined: 31 Mar 2013 15:13
Owned TM-games: TMU TMUF

Re: php5.6/php7 compatibility + memleak fix

Post by NoTimeToDrive » 16 Feb 2017 18:35

Hey Bueddl

Thanks a lot for your info!!
This weekend I will try.
Now Server is most time busy.
And if there are problems,
I have more time to check.
During the week I'm too busy with work.

Server name: PlaneTMX FunTime!!!

Thanks a lot again ;-)

===============================
EDIT:21-2-2017

Hey.

I add/replace the new file's.
And so far...I don't see any problems.
Server runs oke.

Thanks ;-)
===============================
Greetings Ed

Bueddl
speedy pilot
speedy pilot
Posts: 461
Joined: 05 Apr 2008 12:37
Owned TM-games: TMO, TMS, TMU/N(F)
Location: Germany
Contact:

Re: php5.6/php7 compatibility + memleak fix

Post by Bueddl » 25 Feb 2017 13:41

NoTimeToDrive wrote: I add/replace the new file's.
And so far...I don't see any problems.
Glad to hear that :-)

Hoerli
highway camper
highway camper
Posts: 3
Joined: 19 Jul 2015 16:07
Owned TM-games: TMU, TMO, TM²S, TMT,
Contact:

Re: php5.6/php7 compatibility + memleak fix

Post by Hoerli » 07 Feb 2019 19:08

Heiho!
I hope somebody can help me here.

I have a Ubuntu 18.10 server with php7.2.
xAseco doesn't start properly anymore with a fresh installation and just returns the following error:

Code: Select all

[02/07,20:02:21] [RASP] Calculating ranks...
PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function mysql_insert_id(), 0 passed in /home/gameserver/TrackManiaNationsForever/xaseco/plugins/plugin.rasp.php on line 252 and exactly 1 expected in /home/gameserver/TrackManiaNationsForever/xaseco/includes/modernizer.inc.php:100
Stack trace:
#0 /home/gameserver/TrackManiaNationsForever/xaseco/plugins/plugin.rasp.php(252): mysql_insert_id()
#1 /home/gameserver/TrackManiaNationsForever/xaseco/plugins/plugin.rasp.php(306): Rasp->getChallenges()
#2 /home/gameserver/TrackManiaNationsForever/xaseco/plugins/plugin.rasp.php(618): Rasp->resetRanks()
#3 /home/gameserver/TrackManiaNationsForever/xaseco/plugins/plugin.rasp.php(633): Rasp->onEndrace(Object(Aseco), Array)
#4 /home/gameserver/TrackManiaNationsForever/xaseco/aseco.php(1249): event_endrace(Object(Aseco), Array)
#5 /home/gameserver/TrackManiaNationsForever/xaseco/aseco.php(1602): Aseco->releaseEven in /home/gameserver/TrackManiaNationsForever/xaseco/includes/modernizer.inc.php on line 100
As you can see, the error occurs when calculating the ranks. So with every map change.
Local records & Co are saved as usual.

The funny thing about it:
I have 3 more TM servers running, which started with Ubuntu 18.10 and php7.0.
They also run completely trouble-free with php7.2.
If I now copy the server data and change logins, I end up with the same error again.

I hope that someone will be able to solve the problem in 2019 :)

User avatar
L3cKy
happy cruiser
happy cruiser
Posts: 183
Joined: 05 Sep 2007 13:55
Owned TM-games: TMUF
Location: Berlin
Contact:

Re: php5.6/php7 compatibility + memleak fix

Post by L3cKy » 07 Feb 2019 23:49

Hoerli wrote:
07 Feb 2019 19:08
Heiho!
I hope somebody can help me here.

I have a Ubuntu 18.10 server with php7.2.
xAseco doesn't start properly anymore with a fresh installation and just returns the following error:

Code: Select all

[02/07,20:02:21] [RASP] Calculating ranks...
PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function mysql_insert_id(), 0 passed in /home/gameserver/TrackManiaNationsForever/xaseco/plugins/plugin.rasp.php on line 252 and exactly 1 expected in /home/gameserver/TrackManiaNationsForever/xaseco/includes/modernizer.inc.php:100
Stack trace:
#0 /home/gameserver/TrackManiaNationsForever/xaseco/plugins/plugin.rasp.php(252): mysql_insert_id()
#1 /home/gameserver/TrackManiaNationsForever/xaseco/plugins/plugin.rasp.php(306): Rasp->getChallenges()
#2 /home/gameserver/TrackManiaNationsForever/xaseco/plugins/plugin.rasp.php(618): Rasp->resetRanks()
#3 /home/gameserver/TrackManiaNationsForever/xaseco/plugins/plugin.rasp.php(633): Rasp->onEndrace(Object(Aseco), Array)
#4 /home/gameserver/TrackManiaNationsForever/xaseco/aseco.php(1249): event_endrace(Object(Aseco), Array)
#5 /home/gameserver/TrackManiaNationsForever/xaseco/aseco.php(1602): Aseco->releaseEven in /home/gameserver/TrackManiaNationsForever/xaseco/includes/modernizer.inc.php on line 100
As you can see, the error occurs when calculating the ranks. So with every map change.
Local records & Co are saved as usual.

The funny thing about it:
I have 3 more TM servers running, which started with Ubuntu 18.10 and php7.0.
They also run completely trouble-free with php7.2.
If I now copy the server data and change logins, I end up with the same error again.

I hope that someone will be able to solve the problem in 2019 :)
Did you checked this post?
viewtopic.php?f=127&t=37120#p231233

Post Reply