Error: Composer dependencies require a PHP v8.1.2

I’m having this error but, even though I update to see if that resolved the issue, it didn’t.

[15-Aug-2023 08:08:02 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/website/public_html/payments/vendor/composer/platform_check.php on line 24

“Payments” is the sub-directory where IN is installed.

Behavior: When you try to access the invoice it doesn’t load, it just spins and spins but doesn’t load.

What could it be? I’ve cleared the cache and the and I did the secret phrase update, and nothing. I have the site using PHP8.1 but it continues saying that is 7.3.33.

Hi,

What do you see if you run php -v?

Maybe the web PHP version is 8.x but the CLI version is 7.x.

Not sure what I’m supposed to “run”. Can you be more specific? I’m not programmer.

You’d want to SSH into the server and run php -v from the command line.

Alternatively, you can use the health check option in the app to check the PHP versions.

The health check takes me to a blank page.

And it’s correct. The CLI version is 7.4.33.

The CLI was upgraded but the issue persists. I cleared IN, cache and restarted the server. There’s no errors.

What version PHP is the CLI using?

PHP 8.1.22 (cli) (built: Aug  9 2023 00:00:07) (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

Do you see the same version in the health check?

Nothing comes up with Health Check. Just a blank page. (I responded that before)

Are you using the Flutter or React app?

No. I installed through cPanel. It was working just fine. Someone paid an invoice on Monday. I did all my billing in the beginning of the month and people paid without issues. Yesterday when I was going to do a new invoice, started the problem. I reverted back from my backup and didn’t solve the problem. I just did a new upgrade, and didn’t solve the problem.

I don’t know why something it was working fine, now it’s giving all this problems. :unamused:

The app provides two frontends, which one are you using?

Web.hosts can sometimes change the PHP version which can cause issues.

It’ll be Flutter then.

  • Are there any errors in the browser console?
  • Have you tried the desktop or mobile app? OS tools - Invoice Ninja
  • You said the invoice doesn’t load, do you mean the PDF preview?

-Do you mean this?

-I use desktop and it’s doing same thing.

-Yes, the PDF on the “Preview” for ANY of the invoices can’t be seen. Not even the ones already sent/paid.

Thanks! Are those errors generated in the admin portal or the client portal?

Also, which PDF generator are you using in the .env file. If you aren’t already using hosted_ninja changing to it may help.

Client portal when previewing.

NINJA_HOSTED_PDF=true

Try adding this line, or update if it’s already there

PDF_GENERATOR=hosted_ninja

Should I have this section like this:

NINJA_HOSTED_PDF=true
PDF_GENERATOR=hosted_ninja
LOG_PDF_HTML=false
PHANTOMJS_PDF_GENERATION=false
PHANTOMJS_KEY='a-demo-key-with-low-quota-per-ip-address'
PHANTOMJS_SECRET=secret