Invoice Ninja - 500 Internal error
Hi All,
Just a quick one.
I'm using Invoice Ninja self-hosted, and had some weird problems lately.
I started the desktop app and there was no connection, nothing, not even an error, just black screen in the app.
I opened the webpage of the self-hosted application in Firefox....and here it was, 500 Internal Server error.
Naturally, this was the moment when I opened terminal and logged into the server, checked nginx's logs....this is what was showing up in the nginx error log:
OK, let's get to the steps to fix this:
- Log into your server via terminal and get to the root directory of the ninja installation.
- Run this command (and yes, I needed to run it as root as the owner of all files in 'www-data' rather then the user that I use to log into the server):
sudo composer require mpyw/compoships-eager-limit
- After this is done, type in the same location this:
sudo -u www-data php artisan optimize
- After all was done, I returned to the webpage of my ninja installation and reloaded the page to check if there where any changes. I was very pleased to see that the '500 internal error' was gone, and I could log in normally. The only thing that was different was that some invoice where missing, from last two days. Needed to re-create them again.
Hope this helps if you ever will have the same problem as I have.
Enjoy!