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
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
#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
Thank you. No joy. I got this…
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.
- Root composer.json requires php >=7.1.0 but your php version (5.6.40) does not satisfy that requirement.
- Root composer.json requires PHP extension ext-gmp * but it is missing from your system. Install or enable PHP's gmp extension.
- 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
Loading composer repositories with package information
GitHub API limit (0 calls/hr) is exhausted, could not fetch https://api.github.com/repos/hillelcoren/omnipay-gocardlessv2/commits/a68c65c0d1856c172e7dbc45db517ec9872a4970. 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 https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+mailserver.oxygen.pm+2021-10-04+1502
to retrieve a token. It will be stored in "/home/oxygencrmco/.config/composer/auth.json" for future use by Composer.
Not sure what to do
I suggest checking the PHP version using php -v and/or a phpinfo page.
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
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)
not sure where you are setting the memory_limit configuration, but the script isn’t seeing unlimited memory.