FAST 3.1.3o (2008-03-08) TMS/TMO/oldTMN/oldTMU

Discover FAST, a records keeping server control script with a public records system called Dedimania, which will show records from the server on tm-exchange.com

Moderators: Slig, TM-Patrol

Paris69
speedy pilot
speedy pilot
Posts: 381
Joined: 05 Apr 2006 20:50

Post by Paris69 » 11 Jan 2007 10:35

Hi,
please, which version is for TMN (TMS/TMO)?

and WHERE can i get it?

thx in advance.

/edit: i use the 3.1/3.1.1 for TMU & the 3.00 for TMN/TMO/TMS (... here lookin' for update. or should i use 3.1.1 for TMN?)

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Post by Slig » 11 Jan 2007 15:43

Paris69 wrote:please, which version is for TMN (TMS/TMO)?

/edit: i use the 3.1/3.1.1 for TMU & the 3.00 for TMN/TMO/TMS (... here lookin' for update. or should i use 3.1.1 for TMN?)
3.1.x should work for all, TMU dedicated and TMN/TMS/TMO dedicated. If you have problem with it for TMN let me know. It should work with ingame servers too, but i made very few tests. Of course all features can't work in all cases, ingame servers are very limited, and all new TMU features can work only with TMU dedicated.

If it works like it should, those who can connect to their dedicated in LAN mode only because of their router can specify their real TM login to have their records working.

Paris69
speedy pilot
speedy pilot
Posts: 381
Joined: 05 Apr 2006 20:50

Post by Paris69 » 12 Jan 2007 15:38

OK. Thank you very much. The 3.1.1 works fine now.

bingo87
tricycle manager
tricycle manager
Posts: 28
Joined: 25 Apr 2006 07:51
Location: Belgium

Post by bingo87 » 31 Jan 2007 16:49

does this version work with TM-Nations ??
or only with TM-United ?

Nevermind, i replied to qiuck :oops:
Gamerz, Stay united.

Paris69
speedy pilot
speedy pilot
Posts: 381
Joined: 05 Apr 2006 20:50

Post by Paris69 » 01 Feb 2007 09:02

Slig wrote:3.1.x should work for all, TMU dedicated and TMN/TMS/TMO dedicated.

modbase
pedestrian
pedestrian
Posts: 13
Joined: 03 Feb 2007 13:20

Post by modbase » 03 Feb 2007 14:01

FAST is running perfect on my server, but I can't use the /adm command.
In the config files I have setup everything so I would be the SuperAdmin, but I can't do anything.
Not /adm restart or /adm nextmap ...

pls help!

Paris69
speedy pilot
speedy pilot
Posts: 381
Joined: 05 Apr 2006 20:50

Post by Paris69 » 05 Feb 2007 13:07

edit the XML file, wich has born after you firsttime run the fast. :)

User avatar
Fisch.666
happy cruiser
happy cruiser
Posts: 136
Joined: 18 May 2006 01:13
Owned TM-games: TMU, TMN, TMUF, TMNF
Location: Germany
Contact:

Post by Fisch.666 » 07 Feb 2007 01:56

Hi!

When i try to run fast 3.1.1 on my debian linux box with php 5.2.0 installed i get this output in my .log file:

Code: Select all

<?
//=============================================
// XML PARSER 1.0
// (c) 2006 by Gilles Masson
//=============================================


// parse xml string to assossiative array
// (array built with attrmix mode will not be able to be build in the same xml)
function xml_parse_string($xmlstr,$attrmix=false){
	global $_xml_parser_values;
	$res = array();

	if(strlen($xmlstr)>5){
		$parser = xml_parser_create('UTF-8');
		xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
		xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
		xml_parser_set_option($parser,XML_OPTION_TARGET_ENCODING,'UTF-8');
		xml_parse_into_struct($parser,$xmlstr,$_xml_parser_values,$tags);
		xml_parser_free($parser);
		//debugPrint("xml_parse_string - _xml_parser_values",$_xml_parser_values);
		//debugPrint("xml_parse_string - tags",$tags);
		$res = xml_parser_buildarray(reset($_xml_parser_values),$attrmix);
	}
	return $res;
}

// parse xml file to assossiative array
// (array built with attrmix mode will not be able to be build in the same xml)
function xml_parse_file($xmlfile,$attrmix=false){	
	$res = array();
	if(file_exists($xmlfile)){
		$xmlstr = file_get_contents($xmlfile);
		$res = xml_parse_string($xmlstr,$attrmix);
	}else
		echo "xml_parse_file: can't find file $xmlfile.\n";
	return $res;
}


// make a xml string from an associative array
function xml_build($datas){
	global $_xml_parser_tabs;
	$_xml_parser_tabs = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";

	$res = '<?xml version="1.0" encoding="UTF-8" ?>';
	$res .= xml_parser_buildxml($datas,0);

	return $res;
}


// build xml string from an associative array and save to file
function xml_build_to_file($datas,$xmlfile){
	return file_put_contents($xmlfile,xml_build($datas));
}


//
function xml_parser_buildarray($tag,$attrmix=false){
	global $_xml_parser_values;
	$res = array();
	$tsub = array();

	for(;$tag!==false && $tag['type']!='close'; $tag=next($_xml_parser_values)){

		$tagval = '';
		$tagattr = null;
		$tname = $tag['tag'];

		if($tag['type']=='complete' || $tag['type']=='open'){
			if(isset($tag['attributes'])){
				if($attrmix)
					// attribute in attrmix mode : the key take the attr array
					$tagval = $tag['attributes'];
				else
					// attribute in normal mode : add a special attr key
					$tagattr = $tag['attributes'];
			}
			
			if($tag['type']=='complete'){
				// final value
				if(isset($tag['value'])){
					if($attrmix && isset($tag['attributes']))
						// final key with value and attr in attrmix mode
						$tagval['value'] = $tag['value'];
					else
						// final key without attrmix mode
						$tagval = $tag['value'];
				}
				
			}elseif($tag['type']=='open'){
				// array key
				$tagval = xml_parser_buildarray(next($_xml_parser_values),$attrmix);
			}
			
			// put $tagval and $tagattr in array...
			
			if(isset($res[$tname])){
				if($attrmix && is_array($res[$tname])){
					// key already exist, is an array, and attrmix mode : just  complete the array
					$res[$tname] = array_merge($res[$tname],$tagval);
					
				}else{
					// key already exist : make multi same key array (add '.xml_parser_built.'=>true in array to remind it)
					
					if(!isset($tsub[$tname])){
						// first time : make the array
						$tsub[$tname] = 0;
						if(isset($res['.attr.'.$tname]))
							$res['.attr.'.$tname] = array($res['.attr.'.$tname]);
						$tmp = $res[$tname];
						$res[$tname] = array('.multi_same_tag.'=>true);
						$res[$tname][$tsub[$tname]++] = $tmp;
					}
					if($tagattr!==null){
						if(!isset($res['.attr.'.$tname])){
							$res['.attr.'.$tname] = array();
							$tmp = $res[$tname];
							unset($res[$tname]);
							$res[$tname] = $tmp;
						}
						$res['.attr.'.$tname][$tsub[$tname]] = $tagattr;
					}
					$res[$tname][$tsub[$tname]++] = $tagval;
				}
				
			}else{
				// put normal result in the given array
				if($tagattr!==null)
					$res['.attr.'.$tname] = $tagattr;
				$res[$tname] = $tagval;
			}
		}

	}
	return $res;
}


// 
function xml_parser_buildxml(&$tval,$level){
	global $_xml_parser_tabs,$_xml_parser_sep;
	$res = '';
	if(is_array($tval) && count($tval)>0){

		foreach($tval as $tag => $val){

			if(strncmp($tag,'.attr.',6)==0){
				// attribute: do nothing

			}elseif(is_array($val) && isset($val['.multi_same_tag.']) && $val['.multi_same_tag.']){
				// multi same key array
				for($i=0; $i<count($val)-1; $i++){
					if(isset($val[$i])){
						$tattrs = xml_parser_buildxml_tagattrs($tval,$tag,$i);
						$res2 = xml_parser_buildxml($val[$i],$level+1);
						if($res2=='' && $tattrs!='') // if empty with attrs then make auto close tag
							$res .= "\n".substr($_xml_parser_tabs,0,$level).'<'.$tag.$tattrs.' />';
						else
							$res .= "\n".substr($_xml_parser_tabs,0,$level).'<'.$tag.$tattrs.'>'.$res2."</$tag>";
					}
				}
				
			}else{
				// classig tag
				$tattrs = xml_parser_buildxml_tagattrs($tval,$tag,false);
				$res2 = xml_parser_buildxml($val,$level+1);
				if($res2=='' && $tattrs!='') // if empty with attrs then make auto close tag
					$res .= "\n".substr($_xml_parser_tabs,0,$level).'<'.$tag.$tattrs.' />';
				else
					$res .= "\n".substr($_xml_parser_tabs,0,$level).'<'.$tag.$tattrs.'>'.$res2."</$tag>";
			}
		}
		$res .= "\n".substr($_xml_parser_tabs,0,$level-1);

	}else{
		$res .= $tval;
	}
	return $res;
}


function xml_parser_buildxml_tagattrs(&$attrs,$tag,$index=false){
	$res = '';
	if($index===false){
		if(isset($attrs['.attr.'.$tag]) && is_array($attrs['.attr.'.$tag])){
			foreach($attrs['.attr.'.$tag] as $key => $val)
				$res .= " $key=\"$val\"";
		}
	}else{
		if(isset($attrs['.attr.'.$tag][$index]) && is_array($attrs['.attr.'.$tag][$index])){
			foreach($attrs['.attr.'.$tag][$index] as $key => $val)
				$res .= " $key=\"$val\"";
		}
	}
	return $res;
}

?>
PHP Fatal error:  Call to undefined function  xml_parse_file() in /home/GameServer/TmDedicatedServer/fast/includes/fast_general.php on line 118

Fatal error: Call to undefined function  xml_parse_file() in /home/GameServer/TmDedicatedServer/fast/includes/fast_general.php on line 118
But the xml support in php is enablen when i have a look at the phpinfo.php:
xml
XML Support active
XML Namespace Support active
libxml2 Version 2.6.16
Any ideas how i can fix this problem? Thanks in advance for an reply.

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Post by Slig » 07 Feb 2007 13:45

Are you sure you have php5-cli installed ?
What exact command are you using to start fast ? there is no reason to have php show you a included php file contents like that.

User avatar
Fisch.666
happy cruiser
happy cruiser
Posts: 136
Joined: 18 May 2006 01:13
Owned TM-games: TMU, TMN, TMUF, TMNF
Location: Germany
Contact:

Post by Fisch.666 » 07 Feb 2007 18:11

Hi Slig,

thanks for your reply!

I've installed php 5.2.0 from the sources, so php5-cli is installed:
$ php --version
PHP 5.2.0 with Suhosin-Patch 0.9.6.2 (cli) (built: Dec 1 2006 16:08:01)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
with Zend Extension Manager v1.0.11, Copyright (c) 2003-2006, by Zend Technologies
with Suhosin v0.9.16, Copyright (c) 2002-2006, by Hardened-PHP Project
with Zend Optimizer v3.2.0, Copyright (c) 1998-2006, by Zend Technologies
I start fast like this:

sh fast3.sh /path/to/dedicated.cfg

and the output above is logged into the

/path/to/dedicated.cfg.log

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Post by Slig » 08 Feb 2007 15:22

i don't see what can happen...

'which php5' indicate the right binary ?
test a direct launch from the fast.php directory : php5 fast.php dedfile.cfg

User avatar
Fisch.666
happy cruiser
happy cruiser
Posts: 136
Joined: 18 May 2006 01:13
Owned TM-games: TMU, TMN, TMUF, TMNF
Location: Germany
Contact:

Post by Fisch.666 » 09 Feb 2007 02:30

Hi!

Thanks again for your reply.
Slig wrote: 'which php5' indicate the right binary ?
Yes, which php indicates the right binary for my php installation:

Code: Select all

$ which php
/usr/local/php/bin/php
Slig wrote: test a direct launch from the fast.php directory : php5 fast.php dedfile.cfg
Ok, when i start fast like this:

php fast.php ../dedicated.cfg

then i get the same error above. :(

Maybe this:

Code: Select all

PHP Fatal error:  Call to undefined function  xml_parse_file() in /home/GameServer/TmDedicatedServer/fast/includes/fast_general.php on line 118

Fatal error: Call to undefined function  xml_parse_file() in /home/GameServer/TmDedicatedServer/fast/includes/fast_general.php on line 118
is the problem because i can't find the xml_parse_file function in the php functions list:

http://www.php.net/manual-lookup.php?pa ... parse_file

Only the xml_parse function is listened.

Hor
pedestrian
pedestrian
Posts: 9
Joined: 09 Feb 2007 04:08

Post by Hor » 09 Feb 2007 04:12

Slig wrote:
Paris69 wrote:please, which version is for TMN (TMS/TMO)?

/edit: i use the 3.1/3.1.1 for TMU & the 3.00 for TMN/TMO/TMS (... here lookin' for update. or should i use 3.1.1 for TMN?)
3.1.x should work for all, TMU dedicated and TMN/TMS/TMO dedicated. If you have problem with it for TMN let me know. It should work with ingame servers too, but i made very few tests. Of course all features can't work in all cases, ingame servers are very limited, and all new TMU features can work only with TMU dedicated.

If it works like it should, those who can connect to their dedicated in LAN mode only because of their router can specify their real TM login to have their records working.



I can't find out where to specify my real TM login?

Paris69
speedy pilot
speedy pilot
Posts: 381
Joined: 05 Apr 2006 20:50

Post by Paris69 » 09 Feb 2007 08:41

Paris69 wrote:edit the XML file, wich has born after you firsttime run the fast.
admin.tmn.YourServerLogin.xml.txt

Hor
pedestrian
pedestrian
Posts: 9
Joined: 09 Feb 2007 04:08

Post by Hor » 09 Feb 2007 12:25

Its no problem with the admin commands. I can make them work.

But the server isnt saving my times, because im connected through lan. (dedimania isnt saving my rec's)

I get this message: "You use a LAN connection, and don't have a login for records actually" (in the game chat when i connect to the serv)



Everything else seems to work fine. Its saving everybody elses records

Post Reply