Setup button blocks continuing

Hi there,

I’ve been using 4.5 for a while, just began installing v5 to test.

Problem is that after filling out all info on the setup page (and verifying it) I click submit and am redirected to the setup page.

I checked in my server root and the .env file is not created. I also tried creating my own .env from the example (and filling out all relevant details), but I am still stuck at the setup page.

I have to admit that I am new to v5 so I don’t know yet where to look for problems. I checked permissions on the folder and they are all owned by www-data:www-data.

Nginx, Debian 10, PHP 7.4

Please help me figure out where to look for the problem.


Are there any errors in the logs in storage/logs

The info here may help: Free Source Available Invoicing, Expenses & Time-Tracking | Invoice Ninja

Thanks fo the reply.

I have two errors which I think relate to permissions in the laravel.log file.

[2022-01-10 16:06:34] production.INFO: file_put_contents(/var/www/MySiteFolder/.env): failed to open stream: Permission denied


[2022-01-10 16:14:02] production.INFO: db fails

The permissions for the .env file are as follows:

-rw-r–r-- 1 root www-data 1157 Jan 10 11:38 .env

and the permissions of the root folder for Invoice Ninja is:

drwxrwsrwx 13 www-data www-data 4096 Jan 10 13:13 MyGreatSite

My hope is it’s just something simple I’m missing, the whole PHP artisan stuff is new to me.

From: Free Source Available Invoicing, Expenses & Time-Tracking | Invoice Ninja

Ensure the file permission have been set to the web server user. For example in Ubuntu this is www-data if you have configured a virtual host with a root directory of /var/www/html you would set the ownership like this.

sudo chown -R www-data:www-data /var/www/html

Yes thank you for the suggestion, I have tried setting the ownership a few times already.

I tried setting the permissions again on Invoice Ninja’s root folder (the html folder for nginx) using the exact command above, and I am still redirected back to the setup page. I checked to make sure that nginx is running as www-data and it is.

For some reason the .env is not working, or there is some other problem I haven’t thought of.

Thanks again.

@david do you have any ideas?

Hi again, I have fixed it so far, thanks to your help.

I tried two things at the same time, I’m not sure which one worked:

php artisan migrate:fresh --seed

from the guide, as well as:

kind of embarrassing, but it is possible that my password manager had been replacing my database credentials when I entered my user credentials in the lower pane. If this is what fixed it it counts as human error so I’m going to say that the previous fix worked. :wink:

1 Like