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


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


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


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