TM-FORUM

The TrackMania universal forum ^_^
It is currently 27 Apr 2017 21:40

All times are UTC + 1 hour




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: [XAseco2] modernizer (adds support to php 5.6 and php7.0)
PostPosted: 21 Jul 2016 20:45 
Offline
smooth traffic navigator
smooth traffic navigator

Joined: 02 Jul 2009 22:24
Posts: 213
Owned TM-games: TMUF
Hi everybody,

You know I have had some critics about xaseco2, but i still love this controller since I learned to code making plugins for this... so xymph and all others, here's my attemt to add some years to xaseco2 triumph :) I had this crazy idea... and looks like it works... this should enable xaseco2 and alot of dependand plugins to work without any additional changes!

So i tried to make it super simple for you and here it goes:

1. Download Modernizer.zip
2. extract it to xaseco2 main folder
3. edit xaseco2.php and add
Code:
require_once('includes/modernizer.inc.php');


to be very first command after <?php and the comments
(there is other require_once, add this to be the very first before others) :)


*edit*
In case you want all-in-one solution, without need of editing any source files... Modernizer is now added to Toffes patched xaseco2 fork, which you might be interested, since it has already patches for https and new serverlogin stuff for MX and it has added 2MB maps support:

you can find it at https://github.com/tomvlk/xaseco2-fork

Have fun,
Reaby


Last edited by reaby on 25 Jul 2016 08:02, edited 3 times in total.

Top
 Profile  
 
 Post subject: Re: [XAseco2] modernizer (adds support to php 5.6 and php7.0
PostPosted: 21 Jul 2016 20:56 
Offline
Pit Crew
Pit Crew
User avatar

Joined: 31 Aug 2009 19:38
Posts: 1304
Location: Germany
Owned TM-games: TMF, TM2C/S/V, SM
Manialink(s): undef, tmkarma
Nice idea for XAseco2, but bad for my UASECO port now... 8)

_________________
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


Top
 Profile  
 
 Post subject: Re: [XAseco2] modernizer (adds support to php 5.6 and php7.0
PostPosted: 21 Jul 2016 21:14 
Offline
Pit Crew
Pit Crew

Joined: 19 Aug 2007 13:58
Posts: 5631
Owned TM-games: TMN, TMU, TMF, TM²
Didn't try it but it seems like a nice idea. Thanks. :thumbsup:

_________________
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub


Top
 Profile  
 
 Post subject: Re: [XAseco2] modernizer (adds support to php 5.6 and php7.0
PostPosted: 23 Jul 2016 21:30 
Offline
highway camper
highway camper

Joined: 23 Jul 2016 21:08
Posts: 2
Owned TM-games: tmuf // tm² stadium
tested & working [ ubuntu 16.04 cli ]
i had to disable plugin.fufi.autoqueue.php

a few other plugins generate warnings in the logfile

Quote:
[XAseco2] PHP Version is 7.0.4-7ubuntu2.1 on Linux

[XAseco2] Load plugin [plugin.checkpoints.php]
[PHP 8192] Methods with the same name as their class will not be constructors in a future version of PHP; Checkpoints has a deprecated constructor on line 34 in file .. /plugins/plugin.checkpoints.php

[XAseco2] Load plugin [plugin.dedimania.php]
[PHP 8192] Methods with the same name as their class will not be constructors in a future version of PHP; IXR_RequestStd has a deprecated constructor on line 164 in file .. /includes/GbxRemote.response.php
[PHP 8192] Methods with the same name as their class will not be constructors in a future version of PHP; IXR_ResponseStd has a deprecated constructor on line 197 in file .. /includes/GbxRemote.response.php
[PHP 8192] Methods with the same name as their class will not be constructors in a future version of PHP; Webaccess has a deprecated constructor on line 121 in file .. /includes/web_access.inc.php
[PHP 8192] Methods with the same name as their class will not be constructors in a future version of PHP; WebaccessUrl has a deprecated constructor on line 318 in file .. /includes/web_access.inc.php
[PHP 8192] Methods with the same name as their class will not be constructors in a future version of PHP; XmlrpcDB has a deprecated constructor on line 13 in file .. /includes/xmlrpc_db.inc.php

[XAseco2] Load plugin [plugin.rasp_jukebox.php]
[PHP 8192] Methods with the same name as their class will not be constructors in a future version of PHP; MXInfo has a deprecated constructor on line 230 in file .. /includes/mxinfosearcher.inc.php

[XAseco2] Load plugin [plugin.musicserver.php]
[PHP 8192] Methods with the same name as their class will not be constructors in a future version of PHP; Music has a deprecated constructor on line 23 in file .. /plugins/plugin.musicserver.php
[PHP 8192] Methods with the same name as their class will not be constructors in a future version of PHP; Ogg_Comments has a deprecated constructor on line 18 in file .. /includes/ogg_comments.inc.php

[XAseco2] Load plugin [plugin.fufi.menu.php]
[PHP 8192] Methods with the same name as their class will not be constructors in a future version of PHP; FufiMenu has a deprecated constructor on line 27 in file .. /plugins/plugin.fufi.menu.php
[PHP 8192] Methods with the same name as their class will not be constructors in a future version of PHP; FufiMenuEntry has a deprecated constructor on line 734 in file .. /plugins/plugin.fufi.menu.php

[XAseco2] Load plugin [plugin.nouse.betting.php]
[PHP 8192] Methods with the same name as their class will not be constructors in a future version of PHP; betting_planets has a deprecated constructor on line 97 in file .. /plugins/plugin.nouse.betting.php

[07/23,19:06:26] [LocalDB] Try to connect to MySQL server on 'localhost' with database 'tm2_modernizertest'
[PHP Warning] Missing argument 1 for mysql_get_server_info(), called in .. /plugins/plugin.localdatabase.php on line 80 and defined on line 171 in file .. /includes/modernizer.inc.php


Top
 Profile  
 
 Post subject: Re: [XAseco2] modernizer (adds support to php 5.6 and php7.0
PostPosted: 23 Jul 2016 23:00 
Offline
smooth traffic navigator
smooth traffic navigator

Joined: 02 Jul 2009 22:24
Posts: 213
Owned TM-games: TMUF
great to hear!

Code:
[PHP Warning] Missing argument 1 for mysql_get_server_info(), called in .. /plugins/plugin.localdatabase.php on line 80 and defined on line 171 in file .. /includes/modernizer.inc.php


This is now fixed too.. redownload and apply the patch :)


Top
 Profile  
 
 Post subject: Re: [XAseco2] modernizer (adds support to php 5.6 and php7.0
PostPosted: 23 Jul 2016 23:08 
Offline
highway camper
highway camper

Joined: 23 Jul 2016 21:08
Posts: 2
Owned TM-games: tmuf // tm² stadium
fixed
Quote:
[07/23,23:58:33] [LocalDB] Load config file [localdatabase.xml]
[07/23,23:58:33] [LocalDB] Try to connect to MySQL server on 'localhost' with database 'tm2_modernizertest'
[07/23,23:58:33] [LocalDB] MySQL Server Version is 5.7.13-0ubuntu0.16.04.2
[07/23,23:58:33] [LocalDB] Checking database structure...

!! important info about a new/clean database
Quote:
[XASECO2 Fatal Error] [LocalDB] Table structure incorrect! Use DOCS/xaseco2.sql to correct this on line etc...

if you get this error when starting xaseco for the first time then:
.. import modern_xaseco2.sql to your sql database
.. restart xaseco

!! edit : autoqueue plugin is working also now


Top
 Profile  
 
 Post subject: Re: [XAseco2] modernizer (adds support to php 5.6 and php7.0
PostPosted: 24 Jul 2016 16:40 
Offline
highway camper
highway camper

Joined: 12 Jul 2016 18:50
Posts: 4
Owned TM-games: TM2S, TMU, TMN
Thank you, This is just Great!
It works!

-

Image


Top
 Profile  
 
 Post subject: Re: [XAseco2] modernizer (adds support to php 5.6 and php7.0
PostPosted: 06 Oct 2016 18:47 
Offline
Pit Crew
Pit Crew
User avatar

Joined: 31 Aug 2009 19:38
Posts: 1304
Location: Germany
Owned TM-games: TMF, TM2C/S/V, SM
Manialink(s): undef, tmkarma
Just want to let you know, that the modernizer seems also work for XAseco (and not only for XAseco2).

Tested with
Code:
XAseco/1.16
Ubuntu/16.04.2
PHP/7.0.8 (cli)
MySQL/5.7.15


Add to aseco.php
Code:
require_once('includes/modernizer.inc.php');

right before
Code:
require_once('includes/types.inc.php');

_________________
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


Top
 Profile  
 
 Post subject: Re: [XAseco2] modernizer (adds support to php 5.6 and php7.0
PostPosted: 15 Oct 2016 18:11 
Offline
smooth traffic navigator
smooth traffic navigator

Joined: 16 Oct 2010 20:45
Posts: 226
Location: Germany
Owned TM-games: TMN! TMF
can't get it working for xaseco and xaseco2
i get this in my log
Code:
[XAseco] PHP Version is 7.0.11-1~dotdeb+8.1 on Linux
[XAseco] Load settings [config.xml]
PHP Fatal error:  Uncaught Error: Call to undefined function xml_parser_create() in /home/tmf/master_xaseco/includes/xmlparser.inc.php:29
Stack trace:
#0 /home/tmf/master_xaseco/aseco.php(221): Examsly->parseXml('config.xml', true, false)
#1 /home/tmf/master_xaseco/aseco.php(698): Aseco->loadSettings('config.xml')
#2 /home/tmf/master_xaseco/aseco.php(2562): Aseco->run('config.xml')
#3 {main}
  thrown in /home/tmf/master_xaseco/includes/xmlparser.inc.php on line 29

That is really great work to get xaseco running on modern php


Top
 Profile  
 
 Post subject: Re: [XAseco2] modernizer (adds support to php 5.6 and php7.0
PostPosted: 15 Oct 2016 21:11 
Offline
Pit Crew
Pit Crew
User avatar

Joined: 31 Aug 2009 19:38
Posts: 1304
Location: Germany
Owned TM-games: TMF, TM2C/S/V, SM
Manialink(s): undef, tmkarma
Did you compiled your PHP with
Code:
--enable-libxml
? It seems there is no XML lib active in your PHP.

_________________
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


Top
 Profile  
 
 Post subject: Re: [XAseco2] modernizer (adds support to php 5.6 and php7.0
PostPosted: 19 Oct 2016 21:02 
Offline
smooth traffic navigator
smooth traffic navigator

Joined: 16 Oct 2010 20:45
Posts: 226
Location: Germany
Owned TM-games: TMN! TMF
that was it, thank you.


Top
 Profile  
 
 Post subject: Re: [XAseco2] modernizer (adds support to php 5.6 and php7.0
PostPosted: 28 Oct 2016 21:06 
Offline
smooth traffic navigator
smooth traffic navigator

Joined: 16 Oct 2010 20:45
Posts: 226
Location: Germany
Owned TM-games: TMN! TMF
I think there is a memory leak somewhere. After using this the modenizer i get random memory related errors
Code:
PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 1179648 bytes) in /home/tmf/master_xaseco/plugins/plugin.rasp.php on line 320

the plugin vary but it is always memory exhaustion and it takes always days till it happens.


Top
 Profile  
 
 Post subject: Re: [XAseco2] modernizer (adds support to php 5.6 and php7.0
PostPosted: 05 Dec 2016 19:34 
Offline
pedestrian
pedestrian

Joined: 04 Dec 2016 21:52
Posts: 11
Owned TM-games: TMN TMU
Hi all,

I'm trying to install it under

Code:
PHP 7.0.8-0ubuntu0.16.04.3 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.8-0ubuntu0.16.04.3, Copyright (c) 1999-2016, by Zend Technologies


... using TMU to join TMNF server (Xaseco 1) but after initialization, got some errors:

Code:
###############################################################################
  XASECO v1.16 running on 127.0.0.1:5010
  Name   : Test Server - Do not use ! Thks. - My_TM_server
  Game   : TmForever United - Stadium - TimeAttack
  Version: 2.11.26 / 2011-02-21
  Authors: Florian Schnell & Assembler Maniac
  Re-Authored: Xymph
###############################################################################
Begin Challenge
[XASECO Warning] Could not get challenge info! (Unknown column 'r.ChallengeId' in 'on clause')
sql = SELECT c.Id AS ChallengeId, r.Score, p.NickName, p.Login, r.Date, r.Checkpoints
                  FROM challenges c
                  LEFT JOIN records r ON (r.ChallengeId=c.Id)
                  LEFT JOIN players p ON (r.PlayerId=p.Id)
                  WHERE c.Uid='Ns_UJnRS48POrKiA4H5PZZNP7VO'
                  GROUP BY r.Id
                  ORDER BY r.Score ASC,r.Date ASC
                  LIMIT 50
[12/05,15:26:14] track changed [undefined] >> [My_TM_server]
[12/05,15:26:14] currently no record on My_TM_server
End Round
End Challenge
[12/05,15:35:13] [RASP] Calculating ranks...
[PHP Warning] Missing argument 1 for mysql_insert_id(), called in ../xaseco/plugins/plugin.rasp.php on line 252 and defined on line 100 in file ../xaseco/includes/modernizer.inc.php
[12/05,15:35:13] [RASP] ...Done!
Begin Challenge
[XASECO Warning] Could not get challenge info! (Unknown column 'r.ChallengeId' in 'on clause')
sql = SELECT c.Id AS ChallengeId, r.Score, p.NickName, p.Login, r.Date, r.Checkpoints
                  FROM challenges c
                  LEFT JOIN records r ON (r.ChallengeId=c.Id)
                  LEFT JOIN players p ON (r.PlayerId=p.Id)
                  WHERE c.Uid='Ns_UJnRS48POrKiA4H5PZZNP7VO'
                  GROUP BY r.Id
                  ORDER BY r.Score ASC,r.Date ASC
                  LIMIT 50
[12/05,15:35:15] track changed [My_TM_server] >> [My_TM_server]
[12/05,15:35:15] currently no record on My_TM_server
Begin Round
[12/05,17:33:32] << player 249 joined the game [My_TM_user : $w$o$f30[Admin] $0C3$o$iMy_TM_user : Belgium : 1988400 : xxx.xxx.xxx.xxx]
[XASECO Warning] Could not insert connecting player! (Field 'Id' doesn't have a default value)
sql = INSERT INTO players
                          (Login, Game, NickName, Nation, TeamName, UpdatedAt)
                          VALUES
                          ('My_TM_user', 'TMF', '$w$o$f30[Admin] $0C3$o$iMy_TM_user', 'BEL', '', NOW())
[XASECO Warning] Could not get player's CPs! ()
sql = SELECT cps, dedicps FROM players_extra
                  WHERE playerID=0
[PHP Warning] mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given on line 123 in file ../xaseco/includes/modernizer.inc.php
[PHP Warning] mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given on line 96 in file ../xaseco/includes/modernizer.inc.php
[PHP Warning] mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given on line 123 in file ../xaseco/includes/modernizer.inc.php
[PHP Warning] mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given on line 96 in file ../xaseco/includes/modernizer.inc.php
[XASECO Warning] Could not get player's style! ()
sql = SELECT style FROM players_extra
                  WHERE playerID=0
[XASECO Warning] Could not get player's panels! ()
sql = SELECT panels FROM players_extra
                  WHERE playerID=0
[PHP Warning] mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given on line 123 in file ../xaseco/includes/modernizer.inc.php
[PHP Warning] mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given on line 96 in file ../xaseco/includes/modernizer.inc.php
[XASECO Warning] Could not insert/update record! (1054: Unknown column 'ChallengeId' in 'field list')
sql = INSERT INTO records
                  (ChallengeId, PlayerId, Score, Date, Checkpoints)
                  VALUES
                  (0, 0, 194880, NOW(), '16960,23210,56920,169080,176600,194880') ON DUPLICATE KEY UPDATE Score=VALUES(Score), Date=VALUES(Date), Checkpoints=VALUES(Checkpoints)
[12/05,17:37:00] [LocalDB] player My_TM_user finished with 194880 and took the 1. LR place!
[12/05,17:37:00] [Dedimania] player My_TM_user finished with 194880 and took the 1. WR place!
[XASECO Warning] {RASP_ERROR} Could not get Player ID for My_TM_user !
[XASECO Warning] Could not insert/update record! (1054: Unknown column 'ChallengeId' in 'field list')
sql = INSERT INTO records
                  (ChallengeId, PlayerId, Score, Date, Checkpoints)
                  VALUES
                  (0, 0, 72700, NOW(), '13470,19990,40860,63260,71150,72700') ON DUPLICATE KEY UPDATE Score=VALUES(Score), Date=VALUES(Date), Checkpoints=VALUES(Checkpoints)
[12/05,17:39:15] [LocalDB] player My_TM_user finished with 72700 and took the 1. LR place!
[12/05,17:39:15] [Dedimania] player My_TM_user finished with 72700 and took the 1. WR place!
[XASECO Warning] {RASP_ERROR} Could not get Player ID for My_TM_user !
[12/05,17:40:48] player My_TM_user clicked command "/admin endround"
[12/05,17:40:48] MasterAdmin [My_TM_user] forces round end!
[12/05,17:41:03] player My_TM_user clicked command "/admin endround"
[12/05,17:41:03] MasterAdmin [My_TM_user] forces round end!
[12/05,17:41:17] player My_TM_user clicked command "/admin pass"
[12/05,17:41:44] player My_TM_user used chat command "/help "
[12/05,17:42:03] player My_TM_user used chat command "/toprecs "
[PHP Warning] mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given on line 68 in file ../xaseco/includes/modernizer.inc.php
[PHP Warning] mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given on line 96 in file ../home/TMServers/GCInaugural/xaseco/includes/modernizer.inc.php
[12/05,17:43:30] >> player 249 left the game [My_TM_user : $w$o$f30[Admin] $0C3$o$iMy_TM_user : 00:09:58]


Can someone help to solve ?

Thanks for help...


Top
 Profile  
 
 Post subject: Re: [XAseco2] modernizer (adds support to php 5.6 and php7.0
PostPosted: 22 Dec 2016 20:24 
Offline
pedestrian
pedestrian

Joined: 04 Dec 2016 21:52
Posts: 11
Owned TM-games: TMN TMU
well,

finaly solved with the help of developpez.net community...

was a db corruption (missing some columns, invalid default date format and missing Id auto-increment) so erased than manualy rebuilt one by one throw phpmyadmin challenges, players, records and rs_x tables using sql files provided with Xaseco, modified the date and datetime default values to "1000-01-01 00:00:00" and now it runs...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group