Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 7/8 Migration Bugs - some Hlstats Funktions not working eg Latency, Suicides #19

Open
stive101 opened this issue Oct 16, 2024 · 4 comments

Comments

@stive101
Copy link

Hello,

When you want to add Actions and save them, it doesn't work due to a MySQL error. The error indicates "not allowed commun ''," in the hlstats_actions row for reward_teams. This happens because 0 is not a valid number; it means nothing, but it must be a number. This function has changed in PHP 7. Latency and Suicides won't work. I tested it with PHP 5.6 and the old version of HLstats (1.6.19), where it works, but not with 1.7 or any other forks.

I'm not very skilled in PHP, but I think there might be two reasons for this issue:

  1. The way things have changed in PHP 7/8 affects how the data (Latency and Suicides) is retrieved from the server and stored in the database.
  2. The fix for CSGO has broken the function for TF2 or other games.

It would be great if you could look into this because I'm not good enough to do it without causing 100 PHP errors. I tried to fix it by using serverpm hlstatspl and playerpm from version 1.6.19, but that caused too many errors because it's written in PHP 5.6.

Thanks!

@DNA-styx
Copy link

DNA-styx commented Oct 18, 2024

Latency

This code got this working for me: DNA-styx@4282b04

@stive101
Copy link
Author

stive101 commented Oct 19, 2024

thank you, i will try to implement that soon for testing,
did u also find out the suicide issue ?

edit : nah wont work for me ;( wich php version did u use to test ?

im using a source sdk multiplayer 2013 mod
and php7.2, in this configuration it wont work,

maybe the bug is in the function itselfs becouse that following thing wont be written in the log :
Update Player pings

im only see the message, when i use php 5.6 with 1.6.19

but cracy thing is, with php5.6 and HLstats 1.6.19, ping and suicide works XD

@DNA-styx
Copy link

DNA-styx commented Oct 19, 2024

suicide

I applied this one and I'm seeing them getting logged
startersclan@732a47a#diff-dcb8718d07bb9a409683086d227ccc63d5e4e32a11fa4fdef5c433f9c1fc3f76R3017

Ping

I'm running 8.3.
It did take a couple of days to appear.

@stive101
Copy link
Author

stive101 commented Oct 19, 2024

ok both work now, thanks :=)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants