Cannot login: system error 400/500 email not found

Good day. My hosted webserver got automatically updated to PHP 8.1.27 which has impacted my ability to login to Ninja (system error 400/500 email not set or not found). I learned that my Sitepad version was incompatible, so I upgraded Sitepad to v1.8.3, and Ninja to v5.8.33. I repopulated the Ninja Installation Details, Admin Account: Admin Email and Admin Password. I still cannot login. It appears that I am not being recognized when authenticating–I have attempted with browser Chrome and Edge, and the Ninja windows app. I would appreciate any guidance in resolving the issues so that I can login to Ninja. Thank you!


If you’re seeing a 400 error I suggest using the recover password option to set a new password.

If you’re seeing a 500 error there should be more details in storage/logs.

I did reset my password. It recognized my email and sent me the link.

Ninja Log: [10-Mar-2024 14:51:59 UTC] PHP Warning: Constant PASSWORD_DEFAULT already defined in /home/cooltvco/public_html/ninja/update_pass.php on line 17

Public Log: [10-Mar-2024 15:10:38 UTC] PHP Warning: Attempt to read property “display_name” on bool in /var/softaculous/sitepad/editor/site-data/plugins/sitepad/seo.php on line 78

I don’t recognize either of these files. One of them is for Sitepad, I’m not sure what that is.

  • Does the reset password email work?

  • What do you see in the storage/logs folder?

Yes. I reset the password but cannot authenticate so I don’t know whether the reset was successful. No error message displayed

The Ninja storage log entry is below, but this is not a new entry. It appears to have been occurring for months based on previous log entries of the same. My server storage space is only at 50%. This seems to be a “memory” issue.

Ninja Storage Log:
[2024-03-10 14:53:40] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 14540800 bytes) {“userId”:1,“exception”:"[object] (Symfony\Component\ErrorHandler\Error\FatalError(code: 0): Allowed memory size of 134217728 bytes exhausted (tried to allocate 14540800 bytes) at /home/<my domain>/public_html/ninja/vendor/symfony/http-foundation/Response.php:408)
#0 {main}

Further thoughts, please?

It may help to increase the PHP memory limit.

I also suggest checking what action triggers that error.


When I input a knowingly bad password it does authenticate as invalid password, so there is some authentication occurring. With bogus password I receive this error:

401: Unauthorized • These credentials do not match our records

That error is triggered when I attempt to login. There is nothing else I can do without being logged-in. I can only attempt to login.

Maybe the APP_KEY value in the .env file was changed, do you have the original value?

Where is PHP memory limit specified? Is this a webserver setting, or a Ninja setting? I am on a hosted server so certain settings are not available to me.

I have daily auto-backups for Ninja and Sitepad. Not sure how to access .env files without restoring the entire Sitepad or Ninja. How might I proceed with this?

APP_NAME=“Invoice Ninja”

The memory limit is typically set in a php.ini file.

I do not see this file on my server, and again, this memory issue has been logged daily for months. I seriously doubt that is the culprit.

This authentication problem did not occur until last night. The technical support agent told me that my server PHP was upgraded and therefore that Ninja version was incompatible. I upgraded both Sitepad and Ninja. Those are the only changes since last night. I was getting this same authentication error before I upgraded Sitepad and Ninja, as well as after. I am a novice so please understand my limitations in diagnosing this problem.

I suggest triggering the 500 error in the app by logging in with the correct password and then checking if you see a new error in storage/logs different to the memory error.

Struggling with this. I am not confident that password authentication attempts are being logged anywhere. There are 5 error_log files, and I’m not seeing any entries being logged.

Is there a better resolution approach here? If I was to delete my Ninja installation, would I be able to reinstall it fresh, then restore from my backup, or would that simply put me back to where I am right now with the same error? What do you advise? I have daily backups in case of issues like this but don’t know the best approach to proceed. Thanks.

Have you check the logs in storage/logs after logging in?

You could try setting up a new install and copying over the database and .env file.

I cannot login. That is the problem. No entries to any of these log files.

I’ll try your suggestion of a new install and copy-over of db and files. Will let you know. Thanks.

Do you see any files in /public_html/ninja/storage/logs?

The laravel.log contains the memory error, but that is a daily log entry going back to what appears to be the very beginning of the installation. Only the memory error.

[2024-03-10 16:55:52] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 14544896 bytes) {“userId”:1,“exception”:"[object] (Symfony\Component\ErrorHandler\Error\FatalError(code: 0): Allowed memory size of 134217728 bytes exhausted (tried to allocate 14544896 bytes) at /home//public_html/ninja/vendor/symfony/http-foundation/Response.php:408)
#0 {main}