AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   HLstatsX:CE (https://forums.alliedmods.net/forumdisplay.php?f=156)
-   -   Installing HLstatsx issues (https://forums.alliedmods.net/showthread.php?t=313199)

g0nz0uk 12-31-2018 08:21

Installing HLstatsx issues
 
Hello,

I've been running a HL Deathmatch server for a while now, however it's on Windows 2003 32bit, so I've built a Windows 2012R2 64bit server (have a OS license) and I've got the server up and running again. However the HLstats I've not managed to get setup at all, I made no notes years ago either.

I've installed MySQL and have tried to import the install.sql

I had to create the database first via the MySQL Shell:

Quote:

mysql> create database hlstatsx;
Query OK, 1 row affected (0.01 sec)

mysql>
Then via command line I tried to import the script to build the tables, but get an error:

Quote:

C:\Users\dummyaccount>mysql -u root -p hlstatsx < c:\hlstatsx\sql\install.sql
Enter password: *********
ERROR 1265 (01000) at line 65: Data truncated for column 'for_PlayerPlayerAction
s' at row 1
Any ideas what I'm doing wrong?

Thanks

NomisCZ 12-31-2018 12:34

Re: Installing HLstatsx issues
 
Hi,
try to create database in utf8mb4_unicode_ci / utf8mb4_general_ci collation. Then import database from sql file.

You can also try to import database via MySQL Workbench https://www.mysql.com/products/workbench/ or some MySQL "admin tool" (Navicat, HeidiSQL, ...)

Which version of the MySQL server do you use (5.6/5.7/8.x)?

g0nz0uk 12-31-2018 14:57

Re: Installing HLstatsx issues
 
Hi, used Workbench with utf8mb4_unicode_ci / utf8mb4_general_ci collation and got the same issues.

Using MySQL version 5.5

g0nz0uk 12-31-2018 15:06

Re: Installing HLstatsx issues
 
Tried this and got the same error:

CREATE DATABASE hlstatsx CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

NomisCZ 12-31-2018 15:20

Re: Installing HLstatsx issues
 
I tried to import install.sql on my local MySQL (Windows) and got the same error. So I imported it into Linux MySQL, then exported and now it works.

Same sql, only exported: https://ufile.io/2m8hh

g0nz0uk 12-31-2018 16:12

Re: Installing HLstatsx issues
 
Wow that worked! thanks, I wonder why.

Quote:

mysql> drop database hlstatsx;
Query OK, 3 rows affected (0.02 sec)

mysql> create database hlstatsx;
Query OK, 1 row affected (0.00 sec)

mysql>
Then ran your script:

Quote:

C:\hlstatsx\sql>mysql -uroot -p hlstatsx < test_stats.sql
Enter password: *********

C:\hlstatsx\sql>
:)

Now I need to remember how to setup the website and link to the DB :)

g0nz0uk 12-31-2018 16:51

Re: Installing HLstatsx issues
 
Website up now, however I can't seem to the file hlstats.pl

On my old server I double click it and all is ok, on this one nothing.

If I try from CMD:

Quote:

C:\hlstatsx\scripts>hlstats.pl
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/
^weapon { <-- HERE steam_id: 'STEAM_\d+:(.+?)', weapon_id: (\d+), class: \d+, t
eam: \d+, shots: \((\d+),(\d+)\), hits: \((\d+),(\d+)\), damage: \((\d+),(\d+)\)
, headshots: \((\d+),(\d+)\), kills: \(\d+,\d+\) }$/ at C:\hlstatsx\scripts\hlst
ats.pl line 3329.

C:\hlstatsx\scripts>
I've installed active perl too.

NomisCZ 12-31-2018 17:50

Re: Installing HLstatsx issues
 
Try this https://www.dropbox.com/s/1wix2t1ncx...tatsX.zip?dl=0

PHP Code:

perl hlstats.pl 


g0nz0uk 12-31-2018 18:39

Re: Installing HLstatsx issues
 
I've downloaded the Hlstatsx.zip are you asking me to replace my hlstats.pl file?

Thanks

NomisCZ 12-31-2018 18:52

Re: Installing HLstatsx issues
 
Yes, replace all files (if you didn't edit them). I think these are the fixed files I used before :-) (on Windows / Linux).

g0nz0uk 12-31-2018 19:16

Re: Installing HLstatsx issues
 
Ok I will give that a try, thanks again.

If that doesn't work could it be my installation of Perl?

g0nz0uk 01-01-2019 05:02

Re: Installing HLstatsx issues
 
Thanks I will try this, if it doesn't work do you think Active Perl is this issue?

I'm trying to locate some instructions for what to do with this HLStatsX folder, so far I've used the files for the website and DB, is it just about getting the HLstats.pl file running and that's it?

g0nz0uk 01-01-2019 05:31

Re: Installing HLstatsx issues
 
If I just run perl/exe from c:\Perl64\bin\perl.exe it just shows a blinking cursor, which I'm not sure if it's normal.

In my environment variables under PATH I have:

C:\Perl64\site\bin;C:\Perl64\bin;C:\Program Files (x86)\PHP\v5.5;C:\Windows\system32;C:\Windows ;C:\Windows\System32\Wbem;C:\Windows\System32 \WindowsPowerShell\v1.0\;C:\Program Files (x86)\MySQL\MySQL Serv

Just manually ran it again:

c:\HLStatsX>perl hlstats.pl
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (you may need to
install the DBD::mysql module) (@INC contains: C:/Perl64/site/lib C:/Perl64/lib
) at (eval 10) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: CSV, DBM, ExampleP, File, Gofer, Mem, ODBC, Oracle, Pg, Proxy
, SQLite, Sponge.
at .//HLstats.plib line 152.
c:\HLStatsX>

NomisCZ 01-01-2019 11:04

Re: Installing HLstatsx issues
 
In Active Perl package manager install this package: https://code.activestate.com/ppm/DBD-mysql/

g0nz0uk 01-01-2019 18:55

Re: Installing HLstatsx issues
 
Failed with this:

c:\ppm install DBD-mysql
syncing site PPM database with .packlists...done
ppm install failed: can't find any package that provides DBD-mysql

I've reinstall Active Perl too.

g0nz0uk 01-01-2019 19:04

Re: Installing HLstatsx issues
 
Got further and reinstalled Active Perl with an older version:

https://1drv.ms/u/s!AiDwztGEAbFV_Dii4xAixN-A-7mg

I then run hlstats.pl, but no data, is it because I'm testing with bots as this use to show more data, unless I'm missing something?

https://1drv.ms/u/s!AiDwztGEAbFV_DfMVbNISchrnjwY

The HL server, HLstatsx/Webserver are all on the same box with the firewall off.

g0nz0uk 01-01-2019 19:34

Re: Installing HLstatsx issues
 
Fixed:

Had to amend the server.cfg with the new local IP :)

log on
logaddress_add 192.168.0.12:27500

Mordekay 01-04-2019 04:40

Re: Installing HLstatsx issues
 
Your fix is actually not a fix for him, it would break his installation.
As the poster stated he is using mysql 5.5. This says to me he is most likely not using php7 as with php 7 mysql was deprecated and mariaDB took place. Getting php7.X running with mysql5.X is a mess and i highly doubt he has done that.
Also he stated that his problem is already fixed. His error was a wrong local-ip address, so nothing with a wrong php or mysql setup.
Please stop posting your "fix" in random threads for problems that are already fixed.


All times are GMT -4. The time now is 01:27.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.