[USER ERROR]VSP requires PHP Version 7.4 to 8.2

Started by Fragenstein, August 05, 2024, 01:57:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Fragenstein

Receiving the following error when trying to parse the logs:

"Error: VSP requires PHP Version 7.4 to 8.2 to run.
- Your version is: "8.2.4"
- Please upgrade your PHP installation."

VSP v1.0.51
Windows 11 Apache Server PHP 8.2.4

Any ideas?

Krillin

#1
Sorry for the delay. There are a few ideas. I will look into this and see what is going on as our development is done using Windows Server 2022 using Apache 2.4.62 with PHP 8.2.16 and there aren't any issues. As it seems your system is not verifying your php version properly.

You need to give me more information on what you are doing rather than this tidbit of information you provided.

Also, update your version of PHP 8.2.4 to 8.2.16. There is no harm in keeping your PHP engine updated to the current version as there could be some minor version detection constant changes in your early version of 8.2.4, because of this there is a fallback written into the PHP Version Detection.

-Krillin
VSP™ v1.1.52 Released currently working on v1.1.53 in progress

Krillin

#2
Here is a possible solution.

Find (line #1249):
function Fff0125cs()
{
  if (php_sapi_name() === 'cli') {
    if (!defined('PHP_VERSION_ID') || (PHP_VERSION_ID < 70400 || PHP_VERSION_ID >= 80200)) {
      echo "Error: VSP requires PHP Version 7.4 to 8.2 to run.\n";
      echo " - Your version is: \"" . PHP_VERSION . "\"\n";
      echo " - Please upgrade your PHP installation.\n";
      echo " - Thank You!";
      F4e6F902f();
      exit;
    } else {
      echo "\nYour PHP Installation Will Work With VSP!\n";
    }
  }

And replace it with:
function Fff0125cs()
{
  if (php_sapi_name() === 'cli') {
    if (!defined('PHP_VERSION_ID')) {
      // Fallback if PHP_VERSION_ID is not defined
      $version = explode('.', PHP_VERSION);
      $versionId = ($version[0] * 10000) + ($version[1] * 100) + ($version[2]);
    } else {
      $versionId = PHP_VERSION_ID;
    }

    if ($versionId < 70400 || $versionId >= 80300) {
      echo "Error: VSP requires PHP Version 7.4 to 8.2.xx to run.\n";
      echo " - Your version is: \"" . PHP_VERSION . "\"\n";
      echo " - Please upgrade your PHP installation.\n";
      echo " - Thank You!\n";
      F4e6F902f();
      exit;
    } else {
      echo "\nYour PHP Installation Will Work With VSP!\n";
    }
  }
}

This will correct the issue with the subversion numbers with 8.2.xx as it was limited to 8.2.00 for some reason. This has NOT yet been published, this will be applied in the next version.

Thank you for your report.

-Krillin
VSP™ v1.1.52 Released currently working on v1.1.53 in progress

Fragenstein

Okay, I upgraded my xampp PHP to v8.2.12 (their latest) and implemented your fix. I was able to get vsp to run, but am getting a bunch of errors:

Deprecated
:  stristr(): Passing null to parameter #1 ($haystack) of type string is deprecated in
C:\xampp\htdocs\vsp.servegame.com\vsp-q3a.php
 on line 697

Warning
:  Undefined array key "gameversion" in
C:\xampp\htdocs\vsp.servegame.com\vsp-q3a.php
 on line 352

Deprecated
:  Creation of dynamic property VSPParserQ3A::$original_log is deprecated in
C:\xampp\htdocs\vsp.servegame.com\vsp-q3a.php
 on line 129

Notice
:  Only variables should be assigned by reference in
C:\xampp\htdocs\vsp.servegame.com\vsp.php
 on line 1086


Skill Definitions not found.
 pub/games/q3a/skillsets/default/default-skill.php
[parser options]: Array
(
    [savestate] => 1
    [gametype] => xp
    [backuppath] =>
    [trackID] => guid
    [xp_version] => 200
)

Fragenstein

max_execution_time is 0

[command-line options]: Array
(
    [parser-options] => Array
        (
            [gametype] => xp
            [savestate] => 1
        )

    [prompt] => 1
    [log-gamecode] => q3a
    [log-gametype] => xp
    [logfile] => D:/Quake III Arena/excessiveplus/logs/server_mp.log
    [config] => pub/configs/cfg-default.php
)

Let me know if you need any other info, log files, etc...

Krillin

I am not exactly sure how you are running VSP as you are not sharing how you are running VSP (web / CLI) or the command used to run. Because if memory serves me correctly, you were also using an UNOFFICAL version of VSP and attempted to get assistance here for it. So I cannot be assured you are using a valid version of VSP.

I would like to take a look your errors, but I would require to run my isolated development build against your a log file. Also, please provide to me what distribution of Q3 you are running. For example are you running and OEM or Steam Version of Q3/Q3TA. I lost everything I owned (my games, my gaming computer and my dedicated gaming servers) so I currently have nothing to work with except my file server (windows) and my work laptop (also windows).

If you do not feel safe posting your log file here, then please email me the log and I will look at it. I am currently building a Social Media Site using Laravel 11 with Vue, so when I get the time I will look into addressing these errors.

Thanks for your cooperation and my apologies for the issues.

-Krillin
VSP™ v1.1.52 Released currently working on v1.1.53 in progress

Fragenstein

#6
I was able to get PHP 8.2.16 installed on the XAMPP server. I deleted all files and re-uploaded them (vsp-core_v1.0.51) to the server. I dropped all the tables in the database and let vsp recreate them. Still getting the same errors. I'm running vsp from a .bat file...

C:\xampp\php\php.exe -f "C:\xampp\htdocs\vsp.servegame.com\vsp.php" -- -l q3a-xp -p savestate 1 "D:\Quake III Arena\excessiveplus\logs\server_mp.log"
I'm running OEM Q3A with Excessive plus MOD. I've attached game log file. (ATTACHMENT REMOVED - JIC - Krillin)

Krillin

#7
Sorry for the delay, I did not know you had replied so quickly. Thank you for the a log file to work with!

Using XAMPP! I would have assumed you would have been using a webhost for your game's server logs. I was using this kind of setup on my laptop for developing. I am now using my live production server which is on windows. I really did not get the opportunity to thoroughly test this with Q3/Q3TA etc.

I will return back here with an update when I get this sorted out. I will start on this right now. Deprecations are normally easy to resolve, other issues may take some time. But this doesn't look too bad. Also, what version is EP on right now 203? I will check if this is getting in the log file or not.

For now, it maybe wise to just stick with PHP 8.0 - 8.1?

-Krillin
VSP™ v1.1.52 Released currently working on v1.1.53 in progress

Krillin

You will be happy to know, after getting to work on the issue with VSP™ Q3A issue. I have FINALLY got it working 100% error free with Q3A/TA server log files. I had a few old games.log laying around or recovered from 2008 and there weren't any issues.

I will be releasing VSP-CORE-v1.1.52 as I just got it done about 3 hours ago, but I am not ready to release it  until I get it tested with ExcessivePlus 2.3. I am running a test server now with E+ 2.3 with BOTS playing in to get a decent server log file. I do go in and play myself here and there to take a break while I work out a problem I am stuck on or to take out my frustration on to regroup.

So, I will soon find out if the newly developed VSP™ v1.1.52 will work, once again with Q3A with E+. The character conversion is very impressive and complete here, symbols used and the color codes work as programmed! I am very pleased with this project and proud to bring it to the public once again.

I will be thanking ^7F^5r^2a^3g^7e^1n^7S^5t^3e^2i^7n for bringing this to my attention and I got to work immediately on the issue as Q3A is where I got started with VSP in 2004. Despite having learned he is using a Non-Authentic Version of VSP from 0.45 "0.45-xp-1.1.2" (this predates 2007) and are unofficial. The authentic version of VSP™ is designed for longevity and pruning log files looses players stats. Our Counter-Strike stats go back to 2005 with 265,526 in 4.6 GB boiled down to just over 1GB of a player data tracked by GUID.

Stay Tuned!
VSP™ v1.1.52 Released currently working on v1.1.53 in progress

Fragenstein


Krillin

#10
Check out the latest info at:

VSP™ Home Page

This is just an announcement. I hope to have the version released late this week or next. Working with PHP 8.4.1!

Thanks again,
Krillin
VSP™ v1.1.52 Released currently working on v1.1.53 in progress

Krillin

Quote from: Fragenstein on September 28, 2024, 07:17:50 PMI was able to get PHP 8.2.16 installed on the XAMPP server. I deleted all files and re-uploaded them (vsp-core_v1.0.51) to the server. I dropped all the tables in the database and let vsp recreate them. Still getting the same errors. I'm running vsp from a .bat file...

C:\xampp\php\php.exe -f "C:\xampp\htdocs\vsp.servegame.com\vsp.php" -- -l q3a-xp -p savestate 1 "D:\Quake III Arena\excessiveplus\logs\server_mp.log"
I'm running OEM Q3A with Excessive plus MOD. I've attached game log file. (ATTACHMENT REMOVED - JIC - Krillin)

Just know when you run the new VSP™ version, you do not have the option to run with the switch -l q3a-xp.

And in the config/default-cfg.php you would just set the Game Option;
  $cfg['game']['name'] = "q3a";

VSP™ reads the game's log file and determine what MOD is running with Q3A. I noticed VSP-Core_v1.0.51 was built in a hurry (and it was) as March 1, 2024 was creeping up on me and I really did not have the time to sit down and go through the code, function by function, line by line to make sure this was as stable as it needed to be. I have also learned the code was dumped into files using some sort of PHP Encoder & Obfuscator as now they are very outdated. But I got it and I know this code very intimately.

-Krillin
VSP™ v1.1.52 Released currently working on v1.1.53 in progress

Krillin

The version of VSP™ CORE 1.1.52 is posted. Be advised, you will need to download Q3A Default Mediaset. I am still working on a few more key features I would like to see implemented, but I am having some trouble getting them working. So I will save this for the next release.

Enjoy!

-Krillin
VSP™ v1.1.52 Released currently working on v1.1.53 in progress

Fragenstein

#13
Quote from: Krillin on November 26, 2024, 10:57:28 AMJust know when you run the new VSP™ version, you do not have the option to run with the switch -l q3a-xp.

And in the config/default-cfg.php you would just set the Game Option;
  $cfg['game']['name'] = "q3a";

-Krillin

I just uploaded all the latest media files and vsp version. When I run with -l q3a switch it runs successfully, but there is no output at all on the site. When I run with -l q3a-xp switch it runs with errors and all the player names are ^7. Here is a list of the errors...

Apache Error Log:
[Mon Dec 16 11:31:08.291527 2024] [php:warn] [pid 5624:tid 1936] [client xx.xx.xx.xx:xxxxx]
PHP Warning:  Attempt to read property "fields" on bool in \\themes\\bismarck\\awardstat.php on line 171, referer: /themes/bismarck/index.php?config=cfg-default.php&sort=skill&start_from=0

[Mon Dec 16 11:31:08.291527 2024] [php:error] [pid 5624:tid 1936] [client xx.xx.xx.xx:xxxxx]
PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in \\themes\\bismarck\\awardstat.php:171\nStack trace:\n#0 \\themes\\bismarck\\awardstat.php(262): drawAwardList()\n#1 {main}\n  thrown in \\themes\\bismarck\\awardstat.php on line 171, referer: /themes/bismarck/index.php?config=cfg-default.php&sort=skill&start_from=0

Errors from running vsp:
PHP Warning:  Undefined array key "xp_version" in \vsp-q3a.php on line 168

PHP Warning:  preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in \vsp-q3a.php on line 170

PHP Deprecated:  strtr(): Passing null to parameter #1 ($string) of type string is deprecated in \vsp-q3a.php on line 177
PHP Warning:  Uninitialized string offset 0 in \vsp-q3a.php on line 178

PHP Notice:  Only variables should be passed by reference in \vsp-q3a.php on line 536

Generate Awards: Generating Awards...
Award Definitions not found.
 ←—— pub/games/q3a/awardsets/default/default-awards.php

Krillin

#14
Sounds like there is an issue with the database connection? If there wasn't a connection, VSP would not run, throw an error and quit running as there would be nothing for it to do.

Is this a 100% clean install with a fresh database?

I just posted the vsp-media-q3a-default.* files just this morning. I have ran your log files dozen of times. Can you please zip up your setup to me so I may have a look at them, at face value it looks like there is a mix up as the Authentic version of VSP runs perfectly.

I am assuming you are using XAMPP with PHP 8.2.xx on windows here? Because I see you are still using the unauthorized version seen here?

Without seeing the files and database setup, I am dead in the water here. You can PM them to me.

The error message are being thrown due to not finding data, BTW. We need to figure out why this is and I have a huntch.

Sorry and thanks!


P.S. In these stats FragenStein is ranked #77
VSP™ v1.1.52 Released currently working on v1.1.53 in progress