Error: Composer dependencies require a PHP v8.1.2

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

That looks normal.

Did you check the system PHP version in WHMs multiPHP manager?

1 Like

Yes, it was the first thing we checked. Puzzling isn’t? :thinking:

I’m asking the techs to recheck the latest upgrade of CLI to be certain that part is done and well.

Is this server specifically just for invoiceninja or do you have other sites on the same server?,

I have other accounts on the server.

Is this supposed to be “off”?

That’s opcode caching for cli. Shouldn’t be related to any issues.

The error that showed yesterday was from another thing (cronjob), not the app persé.

So, I upgraded to v5.6.31-C123 but it stills not loading the client portal pdf preview. No errors are showing on the logs. Actually, haven’t shown errors for few days. The PDF loads while creating the invoice, just not on the popup and when you use the link that appears on the window and open it, it then will show the amount of the invoice and shows as “viewed” in the app. If you click “Pay Now” without going directly to the link shown, it will display like $0 (like is not being generated).

Also, I saw some “commits” on GitHub that I don’t see on the version, and they have to do with the pdf and invoice creation, but I might be wrong because even the line numbers don’t match.

Do you see the same errors in the browser console in the client portal?

Do you mean this?

Or this:

You could try overwriting with the full package including composer dependencies.

@david @ben do you have any suggestions for the "Livewire is not defined’ error?

I really need a response. I could reinstall everything again and bring the database but what if I go through all that trouble and solve NOTHING, then what am I supposed to do? :cold_sweat:

Trying either a clean install or copying the latest release over the current install I think is the best next step.

Now I know that it has to do with IN being installed in a sub-directory. The livewire is not finding that file since it’s looking as if my website was on root. I’ve tried several “fixes” from here and from the Internet, they didn’t solve the problem. I will try to overwrite all the files, I hope that doesn’t make it worse. I already scanned to see if there were different files and they aren’t. There’s only 1 file that I have on my backups that is new (besides of course of env). The files is: \invoice-ninja\public\js\clients\invoices\payment.js

I also compare the files env, config\livewire.php and other related to a new installation I have on same server and besides the domain, they are identical.

Maybe the suggestion here will help:

I tried that one but I will try again. :roll_eyes:

After many many many tests, I KNOW for a fact the issue here is the asset_url. The problem is that after following many different fixes that I’ve found here and all over the Internet, I fix something but something else brakes.

Here are my fixes and the issues:

  • Fix #1: adding the asset_url on the env file, doesn’t fix anything. The livewire.js continues going to the main dir to look for the file.

  • Fix #2: adding env(‘ASSET_URL’), to the livewire config file, solves that issue, but brings another issue Internal Server Error with a strict-origin-when-cross-origin. The same result when adding only env(‘APP_URL’), or adding both. I saw another adding env(‘ASSET_URL’, null), which brakes completely the admin and the preview.

  • Fix #3: adding the full domain to the vendor file as explained here:
    Client Portal page changes or sorting - #6 by extremeskillz

…that also failed.

FYI: I did 2 new installations, one on the root of another account, and another one on a sub-dir. The one on root worked beautifully when previewing the invoice, the one on sub-dir did the same thing, same error. The one of the error was put on root and changed the env lines accordingly… It worked fine.

Resume: The issue or bug is when IN is in a sub-dir. Can someone now please help me? I’m a donor through white labeling but I can donate something extra if it is required. @hillel @david

It does sound like a bug, but as a workaround, you could install on a subdomain.