Error when deleting secondary company "untitled Company", not the main one

Hello! I’m new here. I recently installed InvoiceNinja on my server and paid for the white label. I don’t know how an untitled company has appeared… and when I try to delete it it returns this error:

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



405 Method Not Allowed

Method Not Allowed

The requested method DELETE is not allowed for this U

Headers: {content-type: text/html; charset=iso-8859-1, date: Fri, 09 Feb 2024 09:48:45 GMT, content-length: 223, allow: , server: Apache}}


I wouldn’t expect to see index.php in the URL, can you check that mod_rewrite is enabled?

Yes, it’s enabled

RewriteEngine On RewriteBase / RewriteRule ^$ index.php [R=301,L] RewriteRule ^deleteme\.\w+\.php - [L] RewriteRule "^.env" - [F,L] # RewriteRule "^storage" - [F,L] RewriteRule ^(.well-known)($|/) - [L]

RewriteRule ^(.*)$ public/$1 [L]

You may want to setup a phpinfo page to confirm.

If mod_security is enabled disabling it may help with the error.

1 Like

I disable mod_security through htaccess and the error still happens

Maybe this will help?

1 Like

Fantastic! it works. It worked by combining disabling mod_security and modifying the rule pointed out in the link, adding PUT, PATCH, DELETE and OPTIONS in /etc/httpd/conf/httpd/extra/httpd-directories.conf


Glad to hear it, thanks for the update!