Updating fron 4.5.9 => 4.5.10

The way they described it, it almost sounds like they didn’t have write permissions to /var/www/ninja when copying the new files over. But in a CLI that would have ended with a long list of “Permission Denied” for every file, and in X, it would have simply refused to try.

@marcassin, how exactly did you go about copying the new files to the Invoice Ninja directory?

It’s not the case. I manage many VPS and use only CLI to do that.

@titanfail : Copying with sudo and changing ownership and rights after that.

I think I did miss some steps to achieve the update process, following what I understand when reading the manual. The main concern, after copying the files is : “how to really start the update process” ?

You could try my update script and see if that works for you (just be mindful of the prerequisites in the readme). It works on VMs and bare metal, so no reason it shouldn’t work in a VPS.

I did the update, Downloaded direct from the website then extracted the zip file over the top of the old version, my only problem was .htaccess
I had a custom one (ErrorDocument…, GeoIP, and the biggest was the public Rewrite enabled) I kept a copy so I had to fix the file but all worked for me.

Edited “I also saw a huge speed increase on page loading and server loads was down”

@titanfail I’ll give a look next time I need to update :wink:

I’ve been trying to update for a while now with no success.

I have…

Extracted the ZIp file to the installation folder and all I get is a directory listing when I look at the site ina browser.

I have tried extracting directly into the installation folder and get the same result.

I ahve tried using the command line but still nothing.

Any suggestions on exactly how I can update please?

I know I have done this before but now when I overwrite the files it just displays a directory listing for me.

Sorry, I’n not sure… you should just need to copy over the new files.

Maybe try using the automated script: https://pastebin.com/j657uv9A

Than ks Hillel

I used to be able to simply copy over the files and extract and then run /update but that’s not working.

I created the script too but when I run it I simply get “invalid option”.

If you’re getting an “invalid option” error when you try to run the script, then it’s likely there are DOS-style line breaks in the file (an unfortunate side-effect of using pastebin).

You can check for sure with cat -v name_of_script_file, and if you see any lines ending with ^M, that’s the problem. Simple fix, however. Just install dos2unix (sudo apt install dos2unix), then run dos2unix name_of_script_file. That will remove all the improper line breaks.

Thanks Titanfail

I removed all the line breaks but still get the invalid option error.

That’s the only reason I’ve ever seen for that error, as it’s a very specific issue with bash.

Just to make sure we’re on the same page, you did use dos2unix on the script, correct? Most text utilities won’t show non-printing characters by default, hence the -v switch needed for them to even show up with cat. If you can see them, you can delete them, but dos2unix makes it an instant task. Not trying to be rude or anything, just trying to figure out exactly what’s going on.

Invoice Ninja update script with nonprinting line-breaks.

I had a similar problem when upgrading from 4.5.7 to 4.5.12: after performing the upgrade I get a blank page and nothing is happening.

When going to base URL I get the list of directories and files.

I tried to perform just an install and not upgrade (on a new database), but I get the error message " SQLSTATE[HY000] [2002] No such file or directory" on the Test Connection. I tried to revert to 4.5.7 but I get the same error message on installing 4.5.7.

I did get an error message (in an error log file) about running of memory, so I increase the PHP memory to 256Mb: I don’t get an error anymore … but I still have the other problems.

Any help would be appreciated as I am really stuck here and I wouldn’t like to have to migrate to another software.

First try restarting your SQL server. Should just be sudo systemctl restart mysqld. Failing that, when you’re on the setup page, try using 127.0.0.1 instead of localhost for the DB Host field.

Strangely, using 127.0.0.1 instead of localhost for the DB Host field, worked … but I get an error later.

And there’s an error log :

[08-Apr-2019 10:23:01 UTC] PHP Notice: Undefined index: argv in /home/polo/MC_IN/vendor/symfony/console/Input/ArgvInput.php on line 53

I am stuck on the install/update screen (with Application settings, Database connection, Emails settings etc): when I submit, I get the same page again.

I remembered that I first install InvoiceNinja from Softaculous (from my web host) … but it does not work either. I’ve tried to install a brand new version (new directory and new database) and to upgrade the existent … but still nothing works, and I can not use InvoiceNinja !

I’d like to try the ZIP file overwrite method but that appears to be not working either.