ASECO plugin: ServerStats with graph output

This forum is dedicated to the Aseco/Rasp 2 server records and control script by Flo and Assembler Maniac. Announcements and issues can be discussed in this forum.

Moderators: Flo, Assembler Maniac, f*ckfish, TM-Patrol

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: ASECO plugin: ServerStats with graph output

Post by Assembler Maniac » 27 May 2008 19:43

If you have it disabled during compile, I don't think you can use it later. Try compiling with gd support and see if it works then (can't hurt).
J-S wrote:Yes but No ! That it's during compilation of php but after i have enable GD, look at low of the phpinfo :

Code: Select all

gd
GD Support  enabled  
GD Version  bundled (2.0.34 compatible)  
FreeType Support  enabled  
FreeType Linkage  with freetype  
FreeType Version  2.3.5  
T1Lib Support  enabled  
GIF Read Support  enabled  
GIF Create Support  enabled  
JPG Support  enabled  
PNG Support  enabled  
WBMP Support  enabled  
XBM Support  enabled  

FlyveHest
cyclist
cyclist
Posts: 39
Joined: 27 Apr 2008 20:40
Owned TM-games: TMU

Re: ASECO plugin: ServerStats with graph output

Post by FlyveHest » 28 May 2008 06:34

Assembler Maniac wrote:It's not ImageFontWidth, it's imagefontwidth. I know php is case sensitive, so it might be looking for a function that it can't find based on case.
Strange, I haven't really been using PHP for that long, but, at least on both my Windows and Linux box, functions are not case sensitive.

Take a look at this : http://gaming.gladblad.dk/winfo.php (And this is on Linux, which is normally very strict about case sensitivity)
Assembler Maniac wrote:edit: I just tried this plugin myself and regardless of case, it can't find the imagefontwidth function. I'm running php 5.2.6 so I know it's pretty current. Anyone else have any idea why it can't be found?
I am running php5.2.6 also, and I have done nothing special with my install, GD is 2.0.34 compatible.
Last edited by FlyveHest on 28 May 2008 06:44, edited 1 time in total.

FlyveHest
cyclist
cyclist
Posts: 39
Joined: 27 Apr 2008 20:40
Owned TM-games: TMU

Re: ASECO plugin: ServerStats with graph output

Post by FlyveHest » 28 May 2008 06:43

Just to clarify, development of the plugin was done on a Win2003 box, with a fresh PHP 5.2.6 install, and my server is running on a Linux box, with PHP 5.2.6 also. (You can see the graph on http://gaming.gladblad.dk)

I don't really know if I can give any sort of constructive input about whats happening here (maybe except for BlaHitis time problem, which very well may be because of date formatting on differente locale settings), because actually, this plugin and writing stuff for ASECO is actually the first time i've really done any serious work in PHP (I normally use other languages, and I am employed as a developer by day :))

But, seeing that it works on both Windows and Linux (for me), suggests that it must be a local setting thats in play, and as suggested, it might be a good idea to compare phpinfo()

This i the one for my TM server, running on Linux: http://gaming.gladblad.dk/pinfo.php
And this is from my development server, running Win2003: http://www.gladblad.dk/pinfo.php

FlyveHest
cyclist
cyclist
Posts: 39
Joined: 27 Apr 2008 20:40
Owned TM-games: TMU

Re: ASECO plugin: ServerStats with graph output

Post by FlyveHest » 28 May 2008 06:47

Assembler Maniac wrote:If you have it disabled during compile, I don't think you can use it later. Try compiling with gd support and see if it works then (can't hurt).
Thats at least right about Linux, i'm not really sure about Windows (but, I think everything is compiled into the downloadable Windows PHP executable from start, as compiling things on Windows is not a very common occurence)

On Linux, if GD was not compiled into PHP, it must be recompiled to be added.

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: ASECO plugin: ServerStats with graph output

Post by Assembler Maniac » 28 May 2008 12:34

Ok, I have more info on this, might be helpful to someone.

1. If you're running on windows, you MUST enable the gd2 extension. Open php.ini, search for gd2, un-comment the extension line. (extension=php_gd2.dll, remove ; at beginning of line)

2. If you're running the serverstats for the very first time, you CANNOT enable the graphing, it will crash with div/0 errors because there's no data to work with. (this is fixable)

FlyveHest: You need to add an if statement to see if $maxValue is 0 and set it to 1 so it won't crash on first run.

It's now running ok for me and can find all of the functions that it needs to run.

User avatar
oliverde8
solid chaser
solid chaser
Posts: 1135
Joined: 07 Oct 2006 07:03
Owned TM-games: TMU
Manialink(s): oliverde8
Location: Turkey
Contact:

Re: ASECO plugin: ServerStats with graph output

Post by oliverde8 » 28 May 2008 15:15

Assembler Maniac wrote:Ok, I have more info on this, might be helpful to someone.

1. If you're running on windows, you MUST enable the gd2 extension. Open php.ini, search for gd2, un-comment the extension line. (extension=php_gd2.dll, remove ; at beginning of line)
Did it as can be see :) But still same error so
Assembler Maniac wrote: 2. If you're running the serverstats for the very first time, you CANNOT enable the graphing, it will crash with div/0 errors because there's no data to work with. (this is fixable)

FlyveHest: You need to add an if statement to see if $maxValue is 0 and set it to 1 so it won't crash on first run.

It's now running ok for me and can find all of the functions that it needs to run.
HOw long must it work. I have it on work without graphic and opening graphic makes still same mistake :cry:
ImageImage
Manialink : oliverde8color>
Servers : STATS <> United | VeryShort | Made In Turkey

User avatar
oliverde8
solid chaser
solid chaser
Posts: 1135
Joined: 07 Oct 2006 07:03
Owned TM-games: TMU
Manialink(s): oliverde8
Location: Turkey
Contact:

Re: ASECO plugin: ServerStats with graph output

Post by oliverde8 » 28 May 2008 18:29

Okay works now :)

Had two php.ini and Wamp was changing a bad one

here is it
Image

Thanks to AssemblerManiac
ImageImage
Manialink : oliverde8color>
Servers : STATS <> United | VeryShort | Made In Turkey

FlyveHest
cyclist
cyclist
Posts: 39
Joined: 27 Apr 2008 20:40
Owned TM-games: TMU

Re: ASECO plugin: ServerStats with graph output

Post by FlyveHest » 28 May 2008 19:20

Assembler Maniac wrote:FlyveHest: You need to add an if statement to see if $maxValue is 0 and set it to 1 so it won't crash on first run
Hehe :oops:

I will fix this for the next release, that will also have some other improvements. (and hopefully a fix for Blahitis 24h+ graph problem)

But, that will be early next week, as I am heading to Bremen for a long weekend vacation tomorrow morning :)

Ouwe
happy cruiser
happy cruiser
Posts: 152
Joined: 07 Sep 2007 15:01
Owned TM-games: TMUF, Canyon
Location: The Netherlands

Re: ASECO plugin: ServerStats with graph output

Post by Ouwe » 31 May 2008 09:35

J-S wrote:
J-S wrote:Hi everybody !
i have a problem with the generation of the graph. My graph don't be generate by the plugin

Look my serverstats.xml :

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<settings>
	<entriesprhour>12</entriesprhour> <!-- Number of log entries per hour, must be larger than 0, and less than or equal to 60 (one entry/minute) -->
	<retentiontime>24</retentiontime> <!-- Maximum age of stats, in hours -->
	<extendedinfo>1</extendedinfo> <!-- If 1, will also update the serverstats_extended table with further stats -->
	<verboselogging>0</verboselogging> <!-- If 1, will output more info in the ASECO logfile -->
	<graph>
		<enabled>1</enabled> <!-- If 1, graph output is enabled -->
		<graphdirectory>/</graphdirectory> <!-- Path to the graph output, must be writeable by user running ASECO. REMEMBER! trailing / or \ -->
		<graphfilename>tmstats.png</graphfilename> <!-- Filename of graph (Plugin outputs a PNG, so should end with .png) -->
		<graphwidth>590</graphwidth> <!-- Width of the graph, in pixels -->
		<graphheight>120</graphheight> <!-- Width of the graph, in pixels -->
		<graphservername># SHARKTEAM #</graphservername> <!-- Text to appear top-left in the graph -->
	</graph>
</settings>

Look my phpinfo() (the GD module is enable) :

Code: Select all

GD Support  enabled  
GD Version  bundled (2.0.34 compatible)  
FreeType Support  enabled  
FreeType Linkage  with freetype  
FreeType Version  2.3.5  
T1Lib Support  enabled  
GIF Read Support  enabled  
GIF Create Support  enabled  
JPG Support  enabled  
PNG Support  enabled  
WBMP Support  enabled  
XBM Support  enabled  
Have you got any ideas for my problem ?
Thanks

Regards :)
Personnally i have no errors ... I don't understand why the png isn't generate
Write something inhere:

Code: Select all

<graphdirectory>/</graphdirectory> <!-- Path to the graph output, must be writeable by user running 
For example: <graphdirectory>C:/usbTMFserver2.1\Root</graphdirectory>

Remove the # from: <graphservername># SHARKTEAM #</graphservername>

From what I saw is that when you use it the first time in aseco I had to set this to 1:
<verboselogging>0</verboselogging>
Then I closed aseco, set it back to 0, and all works fine

I hope it helps you...

Ouwe
happy cruiser
happy cruiser
Posts: 152
Joined: 07 Sep 2007 15:01
Owned TM-games: TMUF, Canyon
Location: The Netherlands

Re: ASECO plugin: ServerStats with graph output

Post by Ouwe » 02 Jun 2008 09:42

After a reboot of my server (made no changes) the graph is not working anymore.
I see the picture but it doesn't show the line anymore.
There are people connected to my server.
I tried all things mentioned in this topic, I have also changed settings and put it back to how it was.

Any idea?

User avatar
J-S
happy cruiser
happy cruiser
Posts: 149
Joined: 24 Apr 2008 18:20
Owned TM-games: TMN,TMUF,TMO,TMS
Manialink(s): shark
Location: Grenoble - France
Contact:

Re: ASECO plugin: ServerStats with graph output

Post by J-S » 02 Jun 2008 09:50

Ouwe wrote:
J-S wrote:
J-S wrote:Hi everybody !
i have a problem with the generation of the graph. My graph don't be generate by the plugin

Look my serverstats.xml :

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<settings>
	<entriesprhour>12</entriesprhour> <!-- Number of log entries per hour, must be larger than 0, and less than or equal to 60 (one entry/minute) -->
	<retentiontime>24</retentiontime> <!-- Maximum age of stats, in hours -->
	<extendedinfo>1</extendedinfo> <!-- If 1, will also update the serverstats_extended table with further stats -->
	<verboselogging>0</verboselogging> <!-- If 1, will output more info in the ASECO logfile -->
	<graph>
		<enabled>1</enabled> <!-- If 1, graph output is enabled -->
		<graphdirectory>/</graphdirectory> <!-- Path to the graph output, must be writeable by user running ASECO. REMEMBER! trailing / or \ -->
		<graphfilename>tmstats.png</graphfilename> <!-- Filename of graph (Plugin outputs a PNG, so should end with .png) -->
		<graphwidth>590</graphwidth> <!-- Width of the graph, in pixels -->
		<graphheight>120</graphheight> <!-- Width of the graph, in pixels -->
		<graphservername># SHARKTEAM #</graphservername> <!-- Text to appear top-left in the graph -->
	</graph>
</settings>

Look my phpinfo() (the GD module is enable) :

Code: Select all

GD Support  enabled  
GD Version  bundled (2.0.34 compatible)  
FreeType Support  enabled  
FreeType Linkage  with freetype  
FreeType Version  2.3.5  
T1Lib Support  enabled  
GIF Read Support  enabled  
GIF Create Support  enabled  
JPG Support  enabled  
PNG Support  enabled  
WBMP Support  enabled  
XBM Support  enabled  
Have you got any ideas for my problem ?
Thanks

Regards :)
Personnally i have no errors ... I don't understand why the png isn't generate
Write something inhere:

Code: Select all

<graphdirectory>/</graphdirectory> <!-- Path to the graph output, must be writeable by user running 
For example: <graphdirectory>C:/usbTMFserver2.1\Root</graphdirectory>

Remove the # from: <graphservername># SHARKTEAM #</graphservername>

From what I saw is that when you use it the first time in aseco I had to set this to 1:
<verboselogging>0</verboselogging>
Then I closed aseco, set it back to 0, and all works fine

I hope it helps you...
Thanks, i debug my config with the debugmode and it's work now :3

Ouwe
happy cruiser
happy cruiser
Posts: 152
Joined: 07 Sep 2007 15:01
Owned TM-games: TMUF, Canyon
Location: The Netherlands

Re: ASECO plugin: ServerStats with graph output

Post by Ouwe » 02 Jun 2008 14:24

Ouwe wrote:After a reboot of my server (made no changes) the graph is not working anymore.
I see the picture but it doesn't show the line anymore.
There are people connected to my server.
I tried all things mentioned in this topic, I have also changed settings and put it back to how it was.

Any idea?
Don't know why but suddenly it works again...
Didn't do nothing

cdrw700
happy cruiser
happy cruiser
Posts: 129
Joined: 03 Dec 2006 09:15
Contact:

Re: ASECO plugin: ServerStats with graph output

Post by cdrw700 » 05 Jun 2008 21:20

FlyveHest look what i have done with fusion chart and your plugin easily : http://chti2.ath.cx/

Ouwe
happy cruiser
happy cruiser
Posts: 152
Joined: 07 Sep 2007 15:01
Owned TM-games: TMUF, Canyon
Location: The Netherlands

Re: ASECO plugin: ServerStats with graph output

Post by Ouwe » 16 Jul 2008 06:45

Is there anybody here who got this working for XAseco?
I saw that Willa made a start and I tried also but without succes.
Please help me.

gerryn
highway camper
highway camper
Posts: 1
Joined: 07 Jul 2008 11:05
Owned TM-games: TMNF

Re: ASECO plugin: ServerStats with graph output

Post by gerryn » 16 Jul 2008 17:25

Hi,

Yeah, I would also very much like to get this working for XASECO, I don't know any PHP and at the moment I don't have the time to learn either. I really appreciate the work that people do on their spare time, I can really see the efford now that I hardly have any myself ;)

So if someone would make the efford I can contribute with what I am capable of, bug reporting, testing and what not. Sounds like I get the better end of the deal though :)

Cheers,
Gerry

Post Reply