Error: Composer dependencies require a PHP v8.1.2

That looks correct to me. Are there any new errors in the logs when trying to view the PDF?

@david do you have any suggestions?

Not anymore since the upgrade of the CLI version.

Which version of the app are you using? If you aren’t using the latest upgrading may help.

I’m using 5.6.25 (cPanel latest version). But the issue started BEFORE even upgrading to that version and it was working fine.

I’ve never encounter this type of issue, using it now for a little over 2 years. This is very weird. I also increased the memory limit and that didn’t help.

Sorry, there’s an error now:

[17-Aug-2023 08:08:01 UTC] PHP Fatal error:  Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.2". You are running 7.3.33. in /home/*****/public_html/payments/vendor/composer/platform_check.php on line 24

Same error from yesterday.

Thanks, that’s helpful.

  • How did you get the PHP 8.1.22 version above, is that what you see when running php -v
  • Are there any errors in the browser console when trying to use the health check, also have you tried the health check in the desktop and/or mobile app.

If we can get the health check working we can use it to see which version of PHP the app is detecting.

Correct.

Here’s the console error when trying Health check:

Blank page as well when tried through Windows desktop app.

Can you use the network tab to check the response of the API call to the health check route.

For sure:

You need to open the health check in the app and then click the /api/v1/health_check request in the network tab to view the server response.

I’m not sure if I understand well. But here’s another intent:

In that screenshot you need to click health_check?.. to see the response.

Yes. The health check, as I said before… is always blank page. Not sure if it’s supposed to be like that.

If you click the health_check response in the browser console you can see the response without using the app.

No idea of what you mean. :face_with_spiral_eyes:

Thanks, it looks like the CLI PHP version isn’t available. It may explain why the health check is showing a white screen.

If you’re still seeing the error in the log I assume the CLI version still isn’t correct. How did you check the PHP version?

On the Terminal (WHM).

[root@host ~]# php -v
PHP 8.1.22 (cli) (built: Aug 15 2023 23:11:47) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.22, Copyright (c) Zend Technologies
    with the ionCube PHP Loader v12.0.5, Copyright (c) 2002-2022, by ionCube Ltd.
    with Zend OPcache v8.1.22, Copyright (c), by Zend Technologies
[root@host ~]#

I found this thread which has some suggestions for setting the CLI PHP version using a shared host.

This post has a user also seeing the “Livewire is not defined error”