Can't update any settings / please check that Invoice Ninja v5 is installed on the server

I finally got through the issues I was having setting up a self-hosted instance, but now when I login and try to update anything, such as the Company Name, or create clients I get this error:

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



405 Method Not Allowed

Method Not Allowed

The requested method PUT is not allowed for this URL.

Headers: {allow: , content-length: 220, content-type: text/html; charset=iso-8859-1, date: Tue, 06 Feb 2024 20:24:51 GMT, server: Apache/2}

Any thoughts as to why this is happening?


It may help to disable mod_security

We don’t have mod_security enabled.

I’m not sure, it seems likely it’s related to the local configuration.

I see other reports of this error on the forum, in those case mod_security was the issue.

Well, that doesn’t help… I enabled debug mode, and it’s not creating the logfile in /storage/logs, so I have no idea where to go from here. Any other suggestions?

This app hasn’t been friendly to get going like 99.99999999% of other apps.

@david do you have any suggestions?

So looking at the main apache logs, it looks like the application doesn’t have the right path for all the files (it’s installed as a shared host account);

[Thu Feb 08 06:14:22.008830 2024] [cgi:error] [pid 15872:tid 140308880627456] [client] AH02811: script not found or unable to stat: /var/www/cgi-bin/

The files are not in /var/www… they are somewhere else.

Where in the configuration is the base directory set for all the code?

You can set the APP_URL value in the .env file.