New Install Showing "Whoops, looks like something went wrong."

I am running a fresh install of invoice ninja v4.5.11 in CentOS 7, installed following all the instructions exactly as outlined in the rosehosting article as recommended by the invoice ninja documentation, with the exception of not following the virtualhost part at the end because I don’t want to link any domain to the server like that.

When I navigate to server IP/ninja/public/ I get “Whoops, looks like something went wrong.” and when I went looking in /storage/logs there were no log files listed at all.

Any suggestions on how to proceed from here would be much appreciated! :slight_smile:

It sounds like a permissions problem, the giveaway is that there are no log files written.

The storage folder needs to be owned by the web-server user.

To further debug, you may want to set DEBUG=TRUE in your .env file, this will output errors to screen.

Had pretty much that exact same thing happen when I was setting up a test install the other day.

If you’re a little unclear as to what David is telling you to do, not to worry. ps aux | egrep ‘(apache|httpd)’ should tell you what user Apache is running as. You’ll have several lines showing the running processes for /usr/sbin/apache2. One of them will be root, but the others will be the actual user Apache is running as (in my case, www-data). Whatever it is, we’ll call that $APACHE.

Then you can try running sudo chown -R $APACHE:$APACHE /var/www/html/ninja (or whatever your user and folder actually are).

I went ahead and enabled debug, David’s suspicion of permissions issues seems to be correct. I ran “sudo chmod -R 755 /var/www/hmtl” and I tried “sudo chown -R apache:apache /var/www/html” to no avail, "ps aux | egrep ‘(apache|httpd)’ returns one process running as root, a bunch running as apache (apache is in red), and one at the bottom running as the current system user, looks like the bottom process was just the grep request.

Any more suggestions on how to proceed? Definitely appears to be a permissions issue here, see images attached for error logs & command lines.

https://imgur.com/a/v7zYWYO

755 only gives read and execute access to the group and public users. Might wanna try 775 to make sure the apache user and group both have the same access.

went ahead and changed to 775 and nothing changed, although, through my messing around, I somehow now have /ninja/public redirecting to /ninja/public/setup, and it gives a “requested URL was not found on this server”, it refuses to let me go back to /ninja/public, just keeps forwarding, good sign? Or another thing I’ve messed up?

If it’s redirecting and failing, there should at least be something in /storage/logs/laravel-error.log now. Hopefully.

Try disabling the cancer that is Selinux

selinux already set to permissive (0), there is still nothing when running ls on the /logs directory and vi’ing the file name brings up no existence of that log

@derian00 have you tried disabling selinux completely and rebooting your VM?

@DavidBomba Yes, I have, at this point, I really am completely stumped, any other suggestions?

@derian00

It is definitely a system level issue as the webserver user cannot write to the storage/logs folder.

The usual suspects are folder permissions and SELinux for Centos based systems. I’m not sure where else to look unfortunately.

If you can change your distro to ubuntu, we have an end to end installer here:

https://github.com/invoiceninja/ansible-installer