My Environment:
Ubuntu Server 20.04.4
Nginx
mariadb
pdf generator - snappdf
PHP 8.1.9
Original V5 install was via zip file.
I verified ALL files in /usr/share/nginx/invoiceninja and subdirectories have the correct owner/group, including dotfiles.
Everything was working fine when I started. My 5.3.25 seems stable after upgrading to PHP 8.1.9. I am using snapshots and I am able to roll back my upgrade attempts to my stable install. I have tried several times with different methods. (both GUI and downloading the latest zip) This latest attempt was via the GUI.
Once I hit the upgrade button, I get a 500 error with pretty much anything I do. if I clear the laravel log prior to upgrade attempt, it remains empty. I am getting PHP errors, detailed below.
I tried php artisan optimize from the command line (php -v shows 8.1.9 from the cli) and got basically the same errors as were in my nginx error log for when I tried to access the site. This is the output from the command line:
PHP Warning: Trying to access array offset on value of type null in /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Support/Facades/Schema.php on line 49
PHP Fatal error: Uncaught Error: Call to a member function connection() on null in /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Support/Facades/Schema.php:49
Stack trace: #0 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(166): Illuminate\Support\Facades\Schema::getFacadeAccessor() #1 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(255): Illuminate\Support\Facades\Facade::getFacadeRoot() #2 /usr/share/nginx/invoiceninja/app/Exceptions/Handler.php(79): Illuminate\Support\Facades\Facade::__callStatic() #3 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(366): App\Exceptions\Handler->report() #4 /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(131): Illuminate\Foundation\Console\Kernel->reportException() #5 /usr/share/nginx/invoiceninja/artisan(37): Illuminate\Foundation\Console\Kernel->handle() #6 {main}
thrown in /usr/share/nginx/invoiceninja/vendor/laravel/framework/src/Illuminate/Support/Facades/Schema.php on line 49
I tried the above again. I cleared the bootstrap/cache and made sure to run the composer i -o --no-dev under the context of www-data user. I still got the same error in the logs.
I then downloaded the 5.5.15 zip file and unzipped it into my invoiceninja directory. Now the page starts to load, but I am stuck at a spinning circle animation. The nginx error log is empty. The laravel.log has nothing also. Here are the nginx access log entries:
I am not sure of the consequences, but I think I am going to try renaming my installation, unzipping a fresh copy, then move my .env file over. Not sure if I will need to do anything else.
Update: I removed my invoiceninja folder and installed a fresh instance into an empty directory, then copied my .env over, and I am still stuck at the spinning circle where the two POST entries in the access log are giving a 500 error.