Hi there,
I have an older version on a self hosted Invoiceninja implementation (v4.5.34) which I wish migrate to a self hosted v5. The v5 implementation (docker) is ready on a new vm. However, v4.5.34 does not have “Migrate to the next version of Invoiceninja” option available anywhere under the settings.
The v4.5.34 is running on Ubuntu 18 so I’d rather not want to deal with OS upgrade, if possible. I tried upgrading php to 7.4 (which I believe is a requirement for upgrading to latest version of v4.5.50) on that Ubuntu 18, which turned out to be major pain.
Any recommendation on how I can proceed with the least painful way to complete the v5 migration?
**Thank you for the instructions. I have tried that path but failed in the end. ** I build a new vm with debian 12, php 8.2. Restored the application folder and sql data without any issues. I am not sure what else to do after this point as I am not able to find original v4 installation instructions. (the guides from Install — Invoice Ninja 4.5.50 documentation link didn’t give more than I implemented either). I tried running composer installl with resulted in the errors below === composer install Composer could not detect the root package (invoiceninja/invoiceninja) version, defaulting to ‘1.0.0’. See Troubleshooting - Composer Installing dependencies from lock file (including require-dev) Verifying lock file contents can be installed on current platform. Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run composer update or composer update <package name>. Your lock file does not contain a compatible set of packages. Please run composer update.
** Problem 1**
** - asgrim/ofxparser is locked to version 1.2.2 and an update of this package was not requested.**
** - asgrim/ofxparser 1.2.2 requires php ~5.6|~7.0 → your php version (8.2.26) does not satisfy that requirement.**
** - …**
** - …**
** - …**
** ==========**
**I tried composer update which resulted in **
Composer could not detect the root package (invoiceninja/invoiceninja) version, defaulting to ‘1.0.0’. See Troubleshooting - Composer Loading composer repositories with package information GitHub API limit (60 calls/hr) is exhausted, could not fetch https://api.github.com/repos/hillelcoren/l5-google-cloud-storage. Create a GitHub OAuth token to go over the API rate limit. You can also wait until 2024-12-01 14:42:45 for the rate limit to reset.
When working with public GitHub repositories only, head here to retrieve a token: Sign in to GitHub · GitHub This token will have read-only permission for public information only. When you need to access private GitHub repositories as well, go to: Sign in to GitHub · GitHub Note that such tokens have broad read/write permissions on your behalf, even if not needed by Composer. Tokens will be stored in plain text in “/home/bnadmin/.config/composer/auth.json” for future use by Composer. For additional information, check Authentication for privately hosted packages and repositories - Composer Token (hidden):
=====================
invoiceninja is installed under /var/www/invoice-ninja folder.
Not sure where to go from here. Are there specific instructions for this 4.5.34 to 4.5.50 upgrade process?
I have followed the instructions from the link below to install a fresh copy of the 4.5.5 version of the application on ubuntu 22.04 with apache server.
sudo php8.1 /var/www/invoice-ninja/artisan key:generate
PHP Fatal error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Support/Collection.php:1277
Stack trace: #0 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Support/Collection.php(11): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() #1 /var/www/invoice-ninja/vendor/composer/ClassLoader.php(444): include(‘…’) #2 /var/www/invoice-ninja/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile() #3 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Support/helpers.php(109): Composer\Autoload\ClassLoader->loadClass() #4 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php(89): collect() #5 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php(78): Illuminate\Foundation\PackageManifest->config() #6 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php(26): Illuminate\Foundation\PackageManifest->aliases() #7 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(219): Illuminate\Foundation\Bootstrap\RegisterFacades->bootstrap() #8 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(320): Illuminate\Foundation\Application->bootstrapWith() #9 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Foundation\Console\Kernel->bootstrap() #10 /var/www/invoice-ninja/artisan(35): Illuminate\Foundation\Console\Kernel->handle() #11 {main} in /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Support/Collection.php on line 11
In Collection.php line 11:
During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either
be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily
suppress the notice in /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Support/Collection.php:1277
Stack trace: #0 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Support/Collection.php(11): Illuminate\Foundation\Bootstrap\HandleExcepti
ons->handleError() #1 /var/www/invoice-ninja/vendor/composer/ClassLoader.php(444): include(‘…’) #2 /var/www/invoice-ninja/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile() #3 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Support/helpers.php(109): Composer\Autoload\ClassLoader->loadClass() #4 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php(89): collect() #5 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php(78): Illuminate\Foundation\PackageManifest
->config() #6 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php(26): Illuminate\Foundation\Packa
geManifest->aliases() #7 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(219): Illuminate\Foundation\Bootstrap\Register
Facades->bootstrap() #8 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(320): Illuminate\Foundation\Application->bo
otstrapWith() #9 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Foundation\Console\Kernel-
Apache config points to correct folder which is /var/www/invoice-ninja/public
but when I browse into it, I get a blank page (even with /setup) in Firefox but in Chrome it resultsin;
I have managed to get the login screen after installing v4.5.50 and restoring the db and using the same parameters from the original .env file in the new .env file. I accepts my username and password, then I entered the 2FA code after which point it throws the 500 Server Error.
I have managed to log in. I disabled 2FA on the original (v4.5.34), re-dumped sql and restored into the new one (v4.5.50), then I was able to login without any issues.
Now onto migration to v5.
That was it. I disabled the 2FA for the owner account, re-dumped and restored the sql data. I logged in to the new server (v.4.5.50) as the owner and the migrate option appeared.
I will start the migration process shortly.