Error during upgrade 5.3.7 to 5.3.18


I logged in today and got this message when trying to resend an invitation email to a user:

Error: please check that Invoice Ninja v5 is installed on the server

I then tried to update as I assumed this would cure the issue. I then got the error:

FormatException: SyntaxError: Unexpected token < in JSON at position 0

I now just have a directory listing where once my installation was. I seem to be getting issues every time I try and do anything with InvoiceNinja.

Any help would be greatly appreciated

PHP version 7.4
Platform: Linux
Operating System: CentOS 7 64-bit


Are there any errors in the web server error logs?

@david any thoughts?

Hi, thank you. All I have is this:
[04-Oct-2021 13:35:24 UTC] PHP Fatal error: Declaration of App\Exceptions\Handler::report(Exception $e) must be compatible with Illuminate\Foundation\Exceptions\Handler::report(Throwable $e) in /home/…/…/app/Exceptions/Handler.php on line 48

[04-Oct-2021 13:35:24 UTC] PHP Fatal error: Uncaught ReflectionException: Class App\Exceptions\Handler does not exist in /home/…/…/vendor/laravel/framework/src/Illuminate/Container/Container.php:873

Stack trace:

#0 /home/…/…/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): ReflectionClass->__construct(‘App\Exceptions\…’)

#1 /home/…/…/vendor/laravel/framework/src/Illuminate/Container/Container.php(754): Illuminate\Container\Container->build(‘App\Exceptions\…’)

#2 /home/…/…/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(841): Illuminate\Container\Container->resolve(‘App\Exceptions\…’, Array, false)

#3 /home/…/…/vendor/laravel/framework/src/Illuminate/Container/Container.php(294): Illuminate\Foundation\Application->resolve(‘App\Exceptions\…’, Array, false)

#4 /home/…/…/vendor/laravel/framework/src/Illuminate/Container/Cont in /home/…/…/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 875

Try running composer install

Thank you. No joy. I got this…

composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - Root composer.json requires php >=7.1.0 but your php version (5.6.40) does not satisfy that requirement.
  Problem 2
    - Root composer.json requires PHP extension ext-gmp * but it is missing from your system. Install or enable PHP's gmp extension.
  Problem 3
    - anahkiasen/former is locked to version 4.6.0 and an update of this package was not requested.
    - anahkiasen/former 4.6.0 requires php ^7.2|^8.0 -> your php version (5.6.40) does not satisfy that requirement.

and another 45 PHP warnings, even though PHP 7.4 is configured


composer update
    Loading composer repositories with package information
    Updating dependencies
    GitHub API limit (0 calls/hr) is exhausted, could not fetch Create a GitHub OAuth token to go over the API rate limit. You can also wait until ? for the rate limit to reset.

    Head to
    to retrieve a token. It will be stored in "/home/oxygencrmco/.config/composer/auth.json" for future use by Composer.
    Token (hidden):

Not sure what to do

I suggest checking the PHP version using php -v and/or a phpinfo page.

PHP Version 7.4.24

Was that using php -v or phpinfo/does the other approach also say 7.4?

I would download this package here:

and overwrite your files.


make sure you backup your .env file as you’ll need to copy this back after you have overwritten your files

Thank you.
The first was done with phpinfo() and the following with terminal:
$ php -v
PHP 7.4.24 (cli) (built: Sep 29 2021 17:53:37) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

Thanks David, I think though, after trying on and off to get InvoiceNinja working for several weeks now, I’m going to look for another solution. It is a shame as the system has everything I need but if it’s going to be this unstable on our hosting environment then it’s just not feasible.
Thanks for all your help though!

I thought I would try the re-install and I’m now getting this when trying to log in.

500: Server Error

The memory limit for the domain is unlimited.

[05-Oct-2021 11:37:02 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 20480 bytes) in /home/.../.../vendor/laravel/framework/src/Illuminate/Queue/Listener.php on line 184
[05-Oct-2021 11:37:02 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32768 bytes) in /home/.../.../vendor/symfony/error-handler/Error/FatalError.php on line

It may help to increase the PHP memory limit for the server usually in the php.ini file

The memory limit was set to -1 (unlimited)

@david any thoughts?

not sure where you are setting the memory_limit configuration, but the script isn’t seeing unlimited memory.

I’m having same issue and tried raising the memory limit. I can’t edit any of my Templates & Reminders after upgrade. Any solution for this?

Are you seeing a specific error?

Yes, same error (about memory). Even though I have increased the memory up to 3 times what it was (and even used unlimited).

I suggest using a phpinfo file to confirm the new memory limit has taken effect.