V5 on Apache 2 Issues

Hey all,

Trying to install v5 on apache2 which has been very frustrating. I have been using apache2 since I started using linux for web hosting so it would be really great to stick to it instead nginx.

My issue is a very generic 500 error when I try to connect to website, when I open the log in the storage folder it is empty.

I am new to invoiceninja as previous v4 installations have worked flawlessly for me, this is my first time using v5. With that said sorry for lack of info, but I will provide anything needed.

I followed the guide here obviously making changes to php version to 7.4 and downloading latest v5 from GitHub.

Thanks!

Hi,

@david do you have any thoughts?

Are there any errors in the logs?

you may want to set APP_DEBUG=true in your .env file.

Thanks for your response.

All of my error logs appear to empty except for the error.log in apache, not the individual one for invoiceninja. Here is the log if it helps.

As for .env file, none existed, but for the fun of it, I created one and added the APP_DEBUG=true with same issue.

No .env? Then you haven’t finished preparations. Follow Install Invoice Ninja v5 on Ubuntu 20.04 (you can skip most of the nginx part part, but pay attention to the DocumentRoot)

Especially make sure you have:

  • set ownership and permissions of all your files correctly (chown -R and chmod -R are your friends)
  • initialized the application key
  • pointed your DocumentRoot to /path/to/invoiceninja/public (the public at the end is important)
  • APP_URL doesn’t have a trailing slash
  • mail port and encryption correspond (it’s “25” and “none” or “465” and “ssl” or “587” and “tls”)
  • run artisan optimize

Then point your browser at $APP_URL/setup

1 Like

@aedanc adding to @xoo comments, you should be able to copy the sample .env.example to .env

then run

php artisan key:generate
1 Like

@xoo @David That was it! Creating the .env and populating it with artisan made it work! Embarrassing because prior to this post I kept trying one or the other but was actually supposed to do both.

Thanks for the amazing help!

Welp after going through the setup It loops back to setup again, if I remove /setup from url I see the same wondrous 500 page agin. Ughhh so close

It may help to run php artisan migrate from the command line

@hillel Hi,

just tried that, and still see error 500 page and the setup page.

Okay, so I modified the .env file and changed DB_CONNECTION to the name of my db, that got me to a login screen. Unfortunately now, it doesn’t recognize my login credentials.

Maybe try using the recover password option?

I have, unfortunately says “We can’t find a user with that e-mail address.”

Do you see the email in the users table?

Where would I find the users tables? I figure that would be in invoiceninja itself but I can’t even access that due to login issues. I have ran “artisan tinker” with a successful db connection as well. As far as tinker though I do not know how to use it to show user table.

Okay problem solved. Stupid mistake all along on my end. I didn’t know how to access admin page and added /# to url and all is good.

Since its been a while, assuming it is normal to use /# every time for admin page.

That’s correct, although I think the app should add it on its own

Great! It started doing it after first time opening.

Thanks for the help and dealing with me haha.

1 Like