I killed my invoice ninja trying update to the latest v4 version

I found a vendor folder in /var/www/html/invoiceninja/ninja

Ok it looks like you unzipped the latest release into a subdirectory of invoice ninja - /var/www/html/invoiceninja/ninja

The zip file has vendor directory with all the required files, the reason we removed the old vendor folder is that some paths there were conflicting with the new install.

You are supposed to unzip contents of the zip file into the root directory …

Give me a sec…

Yeah thats what it looks like happened. Can I just move them all to my invoiceninja directory?
and overwrite?

Also I can rebuild the zip and get rid of the subdirectory.

Let’s just do it step by step to make sure…

  1. cd /var/www/html/invoiceninja
  2. rm -rf ninja
  3. cd /tmp
  4. wget --no-check-certificate https://download.invoiceninja.com -O ninja.zip
  5. unzip ninja.zip /var/www/html/invoiceninja
    replacing contents when asked, if it doesn’t ask, something went wrong.
  6. cd /var/www/html/invoiceninja
  7. ls -l
    see if vendor is now there, if not, something went wrong
  8. sudo chown -R www-data:www-data /var/www/html/invoiceninja/
  9. systemctl restart nginx
  10. Visit yourapp/update

chris@server1:/tmp$ sudo unzip ninja.zip /var/www/html/invoiceninja
Archive: ninja.zip
caution: filename not matched: /var/www/html/invoiceninja
chris@server1:/tmp$

I’m gonna have to change the directory to /var/www/html/ninja or the zipfile to invoiceninja

rename the zipfile to invoiceninja

It did the same thing that zip file just has an extra ninja subfolder before it gets to the files.

I downloaded to my deskop and opened it. See screenshot

https://seagateit-my.sharepoint.com/:i:/g/personal/chrishobgood_portcitydata_com/EZpgRqS7qU1JmtooJnKKk90BVGW-w81Ub25nDutgmrVVdA?e=HGJeqM

How about if I unzip it to the tmp dir and then copy the contents to my invoiceninja folder

OK so I got the files updates and vendor is in there now. I tried to url update and I get the following page.
Composer detected issues in your platform: Your Composer dependencies require the following PHP extensions to be installed: curl, dom, gd, gmp, simplexml, xml, xmlreader, xmlwriter, zip

Your php is missing dependencies.

What distro are you on?

Ubuntu 20.04 They must have gotten removed when I purged out php7.2. Is there a quick way to install them all at once?

You will need to install PHP7.4 dependencies

Something like sudo apt-get install php7.4-curl php7.4-dom php7.4-gd php7.4-gmp php7.4-simplexml php7.4-xml php7.4-xmlreader php7.4-xmlwriter php7.4-zip

They would’ve been 7.2 anyway so no good for you.

Yeah, that makes sense.

Ran URL update and now this.

could not find driver (SQL: SELECT engine FROM information_schema.TABLES WHERE TABLE_NAME=‘clients’ AND TABLE_SCHEMA=‘ninja’)

.env file still looks good

Is mysql running?
if so can you run

  • sudo mysql
  • then
  • SHOW DATABASES;
  • Can you see your database in the list?

Also

  • is the .env your original one?
  • Is your APP_KEY correct (unique to your install)?
  • Are the DB credentials correct? Do you have an .env from before you ran the script?

Yes it is all correct and I compared it to a version from before.

Mysql is running and you can see the invoice ninja DB as well?

Does the laravel and server log say anything else?