April 26, 2019 at 10:59 pm #20545
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! 🙂April 26, 2019 at 11:42 pm #20546
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.April 27, 2019 at 12:04 am #20547
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).April 27, 2019 at 12:13 am #20548
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.April 27, 2019 at 12:22 am #20549
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.April 27, 2019 at 12:36 am #20550
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?
April 27, 2019 at 12:47 am #20552
- This reply was modified 4 weeks ago by derian00.
If it’s redirecting and failing, there should at least be something in /storage/logs/laravel-error.log now. Hopefully.April 27, 2019 at 12:58 am #20553
Try disabling the cancer that is SelinuxApril 27, 2019 at 1:02 am #20554
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 logMay 1, 2019 at 3:32 am #20577May 3, 2019 at 1:03 am #20624May 3, 2019 at 1:09 am #20626
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:
You must be logged in to reply to this topic.