PDA

View Full Version : Player trend graph


Gordini
01-31-2013, 03:59
Hi,

I have a little problem, the player trend graph not display.
Is this normal ?
Thanks in advance for your support.

Mavrick4283
01-31-2013, 17:20
I am guessing that the cron job that creates the graph had not run yet.

Gordini
02-01-2013, 07:16
How cron job you talking about ?
I have a cron job that runs once a day this action : ./hlstats-awards.pl

niedzwiedzpn
02-04-2013, 02:29
Please give me the exact command, that I have to write a cron Graph Trend Player began to show.
I would add that the daily prizes and general work.
link to our hlstatsX (http://www.hlstatsx.jamajskie.eu/hlstats.php?game=css)

Mavrick4283
02-04-2013, 08:56
It is on the wiki https://bitbucket.org/psychonic/hlstatsxce/wiki/Install_Instructions#!linux

Gordini
02-05-2013, 11:04
According to the wiki 2 cron jobs:

* run_hlstat - We want to run this about every 5 mins to make sure the daemon has not crashed

* hlstats-awards.pl - This needs to be run once a day other wise you will have no awards, This is also the script that translate ip's to locations and the general maintenance of the DB

The first is only used if the daemon crashes, the second for the awards, I excecute the second that once a day and the player trend graph is not displayed.

Any solutions ?

Mavrick4283
02-06-2013, 08:52
The second is not only the awards it use to be but was changed to run all the maintenance and oddball jobs and was never renamed.

Check to make sure your web server has write permissions in the stats folder (TBH i can not remember what folder for 1.6.X)

Gordini
02-06-2013, 12:10
Ok Mavrick4283

The folder and all subfolders in /hlstatsimg is on 755 and all files in the folder and subfolder /hlstatsimg is on 644




I changed everything on 777 ?

graycat
02-09-2013, 05:35
Im having this same issue.

graycat
02-23-2013, 00:19
bump

LuaStoned
02-25-2013, 12:27
Having the same issue, plus the error thrown:
[Mon Feb 25 12:20:21 2013] [error] [client ***] PHP Notice: Undefined offset: 0 in /var/www/show_graph.php on line 291, referer: http://***/hlstats.php

MUN
03-03-2013, 01:43
in ~/hlstatsimg/ there is a folder called progress. This folder needs to be set to 777 as this is where the images are stored.

If that doesn't fix it you may have other issues. Like try install php5-gd.

gondolf
03-07-2013, 00:03
Hi

Some days ago i had a similar issue, the problem it was because i didnt had installed php-gd on my server, so check for hlstatsx requirements if everything its ok.

Noitartsiger
03-23-2013, 07:52
Same issue here.


~/hlstatsimg/progress/ is set to 777
releasenotes say GD 2.0.1 is installed


Other graphs work fine, only the player trend graph is not created.




EDIT:
in trend_graph.php I find this SQL query:
SELECT UNIX_TIMESTAMP(eventTime) AS ts, skill, skill_change FROM hlstats_Players_History WHERE playerId = '$player' ORDER BY eventTime DESC LIMIT 30"
I assume this brings the basic data for the creation of the picture.
a) when I watch the table 'hlstats_Players_History' I got only 30 records (but have around 1000 active players) - shouldn't it be many more?
b) and I there is no culmn named 'ts'


Ok, although I can't fully understand the code, I guess it's fine, as it seems to work for others. So it's maybe something wrong with the web part, no?!


EDIT:
Alright in the top of the trend_graph.php it says:
// Load database classes
require ('config.php');
require (INCLUDE_PATH . '/class_db.php');
require (INCLUDE_PATH . '/functions.php');
require (INCLUDE_PATH . '/pChart/pData.class');
require (INCLUDE_PATH . '/pChart/pChart.class');
I checked my installation and for some reasons the folder 'pChart' was missing ... -.-
That can be the cause. Now I will wait a few days and lets see if it works.

SINEKT
03-24-2013, 10:35
To have trend graphs working you need your PHP compiled with GD compiled with Freetype support. If you don't host the site on your own webserver, this can be tricky and you might need another host.

I am running HL Stats X on my own Linux webserver, and this was the problem, I needed GD with Freetype support enabled.

You can test this by making a php file like this:

<?
phpinfo();
?>

Save it on the webserver and then acces it from the browser, you should see a long table with all the details of PHP, and check the GD section, it should say "Freetype support: enabled". If you can't find Freetype under GD, or GD section at all, there's your problem!

Noitartsiger
03-25-2013, 09:49
Hi SINEKT, thx for your help!
I still have no player trend graphs.

I checked the phpinfo as you said:

GD Support: enabled
GD Version: bundled (2.0.34 compatible)
FreeType Support: enabled
FreeType Linkage: with freetype
FreeType Version: 2.1.7


:/

SINEKT
03-25-2013, 14:05
My FreeType version is 2.4.11, if this helps. I searched for the latest package available and installed that. Also, check the webserver's error logs (Apache or whatever). Usually you find there the PHP function that doesn't work, and you have something to work with (google the error, and finding out how to remove the error).

You host HLStatsX on your own webserver?

rZr
10-18-2015, 06:30
i have a Problem with the Player trend graph. it is no show. chmod is all on 777

Error.log
PHP Warning: imagepng(./hlstatsimg/progress/trend_2358_1444428000.png): failed to open stream: Permission denied in /var/customers/webs/hlstats/includes/pChart/pChart.class on line 3231, referer: http://xxxx.xxxx.xx/hlstats.php?mode=playerinfo&player=2358


have anyone a idea ?