Update fails and now wants to do a reinstall/fresh install

I just ran the update and it failed with the error message:
image

Some extensions was missing /PHP was required to upgrade to latest version - which I did. But now it wants to install the whole system from scratch:
![image|690


which is definitely not something that I want. I just wanted to upgrade the existing system…

the config env. with the correct information inlducing DB, DBuser and password etc. is still there in the website directory. But Invoice Ninja seem to ignore it?

Any ideas on how to fix this @david so we can keep our data?
We do not wish to do a new installation obviously.

Thanks in advance. :+1:
Kind regards
AngryWarrior.

You’ll want to read the release notes, it requires P hi P 8.1

I think you are missing the PHP 8.1 MySQL extension

1 Like

How do we upgrade to PHP 8.1? I have a build that is having similar issues, not asking to reinstall. but the same upgrade error.

How do I upgrade it to PHP 8.1? I’m using a Virtual Linux Server running Ubuntu

I found it.
I followed these instructions to install PHP 8.1 and setup nginx for it.

Only difference I made was for the Nginx configuration:

sudo nano /etc/nginx/conf.d/invoiceninja.conf

Then I changed the line that has:
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
to:
fastcgi_pass unix:/run/php/php8.1-fpm.sock;

Then Saved and Exit.
Tested: sudo nginx -t
Restart Nginx: sudo service nginx restart

And it all worked with PHP 8.1.8

2 Likes

Thanks you @david for the suggestion. That solved it!

You rock! :facepunch: :guitar:

It also seemed that the MySQL extension wasn’t installed so I did that and enabled it too.

Kind regards
AngryWarrior.

See this one:

As for the PHP extensions follows David’s installation guide/documentation here:
https://invoiceninja.github.io/docs/self-host-installation/

Just note that you need to change the version number out with 8.1:
sudo apt install php8.1-bcmath php8.1-gmp php8.1-fileinfo php8.1-gd php8.1-json php8.1-mbstring php8.1-pdo php8.1-xml php8.1-curl php8.1-zip php8.1-gmp php8.1-mysqlnd

Note: For some reason json is trolling there when you run it as " php8.1-json". Maybe David has an explanation to that?

Kind regards:
Angrywarrior.

I found an unrelated post somewhere that said “Version 8 has moved json into core code and it is no longer a separate module.” Some of the php modules are rolled into common so I used the following which worked. netspeario’s post helps with the rest of it, thanks!

sudo apt install php8.1 php8.1-{common,fpm,bcmath,mbstring,xml,curl,zip,gmp,gd,mysql}

Don’t forget to change www-data’s cron job if you had explicitly stated php7.4 otherwise your queues will be borked.

1 Like

That explains it if they integrated json into the PHP package code itself. :+1:

Thanks…

Kind regards:
Angrywarrior.