Raised This Month: $82 Target: $400
 20% 

Installing HLstatsx issues


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
g0nz0uk
Member
Join Date: Mar 2014
Old 12-31-2018 , 08:21   Installing HLstatsx issues
Reply With Quote #1

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
g0nz0uk is offline
NomisCZ
AlliedModders Donor
Join Date: Mar 2014
Location: $this->Czech_Republic
Old 12-31-2018 , 12:34   Re: Installing HLstatsx issues
Reply With Quote #2

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)?
__________________



Steam: NomisCZ

Last edited by NomisCZ; 12-31-2018 at 12:35.
NomisCZ is offline
g0nz0uk
Member
Join Date: Mar 2014
Old 12-31-2018 , 14:57   Re: Installing HLstatsx issues
Reply With Quote #3

Hi, used Workbench with utf8mb4_unicode_ci / utf8mb4_general_ci collation and got the same issues.

Using MySQL version 5.5
g0nz0uk is offline
g0nz0uk
Member
Join Date: Mar 2014
Old 12-31-2018 , 15:06   Re: Installing HLstatsx issues
Reply With Quote #4

Tried this and got the same error:

CREATE DATABASE hlstatsx CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
g0nz0uk is offline
NomisCZ
AlliedModders Donor
Join Date: Mar 2014
Location: $this->Czech_Republic
Old 12-31-2018 , 15:20   Re: Installing HLstatsx issues
Reply With Quote #5

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
__________________



Steam: NomisCZ
NomisCZ is offline
g0nz0uk
Member
Join Date: Mar 2014
Old 12-31-2018 , 16:12   Re: Installing HLstatsx issues
Reply With Quote #6

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 is offline
g0nz0uk
Member
Join Date: Mar 2014
Old 12-31-2018 , 16:51   Re: Installing HLstatsx issues
Reply With Quote #7

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.
g0nz0uk is offline
NomisCZ
AlliedModders Donor
Join Date: Mar 2014
Location: $this->Czech_Republic
Old 12-31-2018 , 17:50   Re: Installing HLstatsx issues
Reply With Quote #8

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

PHP Code:
perl hlstats.pl 
__________________



Steam: NomisCZ

Last edited by NomisCZ; 12-31-2018 at 17:54.
NomisCZ is offline
g0nz0uk
Member
Join Date: Mar 2014
Old 12-31-2018 , 18:39   Re: Installing HLstatsx issues
Reply With Quote #9

I've downloaded the Hlstatsx.zip are you asking me to replace my hlstats.pl file?

Thanks
g0nz0uk is offline
NomisCZ
AlliedModders Donor
Join Date: Mar 2014
Location: $this->Czech_Republic
Old 12-31-2018 , 18:52   Re: Installing HLstatsx issues
Reply With Quote #10

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



Steam: NomisCZ

Last edited by NomisCZ; 12-31-2018 at 18:52.
NomisCZ is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:07.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode