Upgrade to 4.5.44

Im curently running 4.5.34 and really want to upgrade to the latest version (curently v4.5.44). According to the doc a download and replace the files should be the way. It says: Do not be afraid to overwrite the files, the configuration file for connections such as mysql are stored in the .env file.

After doing so downloading https://download.invoiceninja.com i start by replacing the files through FTP to make sure the correct owner of the files so i dont have to do a chown. After this and going to /update to run the database migrations im getting the error:

SQLSTATE[HY000] [1045] Access denied for user ‘MYUSERNAME’@‘WRONGHOST’ (using password: YES) (SQL: SELECT engine FROM information_schema.TABLES WHERE TABLE_NAME=‘clients’ AND TABLE_SCHEMA=‘ninja’)

Strangely enough it picked up the correct username from the env file but using the wrong host even though the correct host is defined in the env file.

going to login it says: Error: app is already configured, backup then delete the .env file to re-run the setup

So after replacing the files im going through this loop. I was very happy i run daily backups :slight_smile:

Hi,

I’m not sure, the error implies the wrong database credentials in the .env file.

Hi Hillel,

I can assure the path in env is correct. It shows my localhost webserver name instead of the DB server adress that is inside the env file.

remember i only replaced the files in the zip so the env file does not change.

You may want to try testing the database connection details by connecting directly.

Hello, I don’t really want to hijack this topic but preferred to gather information rather than create yet another topic about v4 upgrade.
I currently use a fairly old web hosting plan etc. I’m currently running 4.5.18 and I do also want to upgrade to the latest version so that I can plan a v5 migration afterwards.
It seems the latest version is now 4.5.46.
Should we stick to 4.5.44 or 4.5.46?

It is also mentioned that we can just upload new files (35k files), what if we currently use subdomain + url rewrite, those files must be put aside so that after new files have been transferred, it still works?

Hi,

I didnt change the env file. restoring the backup of the older version fixes it.

I wanted to report back about this issue.

Latest issue was having this error: Error: app is already configured, backup then delete the .env file to re-run the setup

in the end it was indeed the env file. I had a special character in my DB password… Putting the DB password in single quotes solved everything. Somehow ive managed to run InvoiceNinja for years without, but now im a happy latest version user.

DB_PASSWORD=‘My#Password’

2 Likes