Error: Composer dependencies require a PHP v8.1.2

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”

I’m not on share host. I have my own VPS.

As a next step I suggest updating to the latest version of the app.

On the version I have: v5.6.25-C123

On the release:

I don’t have 8.2 I’m using 8.1.

Even though on /public_/vendor/composer/platform_check.php it says 8.1 :roll_eyes:


Where can I see my uploads? (What folder?)

I believe the latest version support 8.1 and 8.2.

I think documents are in the storage folder.

Well, I guess this will make me leave IN behind. Has been 2 days without being able to bill 2 customers I need to bill “yesterday”.

I can’t do an update if is not on Softaculous. I will have to bill customers “manually”, like I used to, until another update comes to the platform.

Thanks for all your help. I know you have been there trying to solve the issue. It’s appreciated.

Sorry I couldn’t solve the problem, @david may have some other suggestions.

In whm/cpanel you can set the PHP version per account. So the version shown through SSH may not reflect the settings for the specific website.

Try setting the global defaul PHP version to 8.1 or 8.2 and double check the site specific settings.

If that doesn’t work, try easy Apache and make sure the php-cli package is installed for each PHP version you use.

Also try running php-cli -v through ssh.

1 Like

Thanks! The php version for the account is 8.1 and the PHP-CLI was run through the terminal (after upgrading).

@hillel I did a restore back from the 15th. Here’s the error showing when I try to preview the invoice:

[14-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
[18-Aug-2023 20:06:01 UTC] PHP Fatal error:  Uncaught Error: Class "ComposerAutoloaderInit06f75d9bb671516440a93032a773a138" not found in /home/***/public_html/payments/vendor/autoload.php:25
Stack trace:
#0 /home/***/public_html/payments/artisan(18): require()
#1 {main}
  thrown in /home/***/public_html/payments/vendor/autoload.php on line 25

Did you check easy Apache?
Seems like the ea-php-cli extension isn’t installed for the PHP version the site is using.

It should look like this for your PHP versions.

That’s the issue here. It wasn’t before but it was updated (you can see my post 2 times above), but the system continue (after upgrade) giving errors, then it stop giving errors but wasn’t loading the pdf on the previews. Neither was loading the amount to pay.

I will check that “Easy Apache” to see if it give more info.

Here it is:

Apologies, it’s a long post and I did speed read. it.

Is there anything in the .htaccess file that might be forcing a PHP version?

I checked that because I saw another post and it seems right.

The last part is:

# Set the “ea-php81” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php81 .php .php8 .phtml
</IfModule>