Hello,
I can no longer login due to receiving a 500: Server Error when trying to login.
Here’s what I have tried to fix this:
downloaded latest release from github and unzipped it into the application directory
cleared out files in /bootstrap/cache/
ran php artisan optimize
ran php artisan flush:cache
This error is showing in the server error_log in the /public/ directory:
PHP Fatal error: Declaration of Symfony\Component\HttpFoundation\Response
HeaderBag::set(string $key, array|string|null $values, bool $replace = true) must
be compatible with Symfony\Component\HttpFoundation\HeaderBag::set(string
$key, $values, bool $replace = true) in /home/myusername/public_html/billing/v
endor/symfony/http-foundation/ResponseHeaderBag.php on line 109
Other information
Shared server
running out of a subfolder (had to make this fix in order to get it running)
Also, I’ve tried putting in a known bad password, and I get “401: These credentials do not match our records” as expected. So it seems like I’m able to authenticate fine. But when I give the correct user/pass/2fa, that’s when I get stopped by the 500 error (loads inside the login box).
Thanks @david I meant to note that I had tried that too. Since I used the github release in a zip file, I wouldn’t think that running composer would be needed here.
In any case, when I run that I get the following:
Installing dependencies from lock file
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
- lcobucci/jwt is locked to version 4.1.5 and an update of this package was not requested.
- lcobucci/jwt 4.1.5 requires ext-sodium * -> it is missing from your system. Install or enable PHP's sodium extension.
Problem 2
- lcobucci/jwt 4.1.5 requires ext-sodium * -> it is missing from your system. Install or enable PHP's sodium extension.
- socialiteproviders/apple 5.3.0 requires lcobucci/jwt ^4.1.5 -> satisfiable by lcobucci/jwt[4.1.5].
- socialiteproviders/apple is locked to version 5.3.0 and an update of this package was not requested.
To enable extensions, verify that they are enabled in your .ini files:
- /opt/alt/php81/etc/php.ini
- /opt/alt/php81/link/conf/alt_php.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-sodium --ignore-platform-req=ext-sodium` to temporarily ignore these required extensions.
I’ve also double checked that I have all the required extensions/modules on my server.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- lcobucci/jwt[4.1.5, ..., 4.3.x-dev] require ext-sodium * -> it is missing from your system. Install or enable PHP's sodium extension.
- socialiteproviders/apple[5.2.0, ..., 5.3.0] require lcobucci/jwt ^4.1.5 -> satisfiable by lcobucci/jwt[4.1.5, ..., 4.3.x-dev].
- Root composer.json requires socialiteproviders/apple ^5.2 -> satisfiable by socialiteproviders/apple[5.2.0, 5.3.0].
To enable extensions, verify that they are enabled in your .ini files:
- /opt/alt/php81/etc/php.ini
- /opt/alt/php81/link/conf/alt_php.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-sodium` to temporarily ignore these required extensions.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
So I’ve installed the Sodium php extension, and that allowed me to run composer update, then I ran composer i -o --no-dev again just for the heck of it. Ran php artisan optimize and rm bootstrap/cache/*.php. Still a 500 error.
Interesting:
If I switch the database to a new install, it works great without the 500 error. When I switch back to the real database, I get the login error. There’s maybe something in the database causing this problem, but I wouldn’t have any idea where to troubleshoot.
Thanks @johnw and @david – I gave up before I got these message. Since I’d only been using InvoiceNinja for a week, I just tried to manually migrate what db tables I could, and called it part of the learning process of a new application.
I had not tried php artisan migrate, and would have liked to try that, but I’m essentially now operating on a brand new installation.