Hi all. Hopefully this can get sorted out easily. The disclaimer is this - I know next to nothing about web/php/Laravel, but I follow instructions reasonably well. I’d like to get this sorted and hopefully give more details for others that would like to use the app as well. So let’s get what I have so far…
InvoiceNinja is a Laravel app - which is a PHP framework. The app has gotten the best reviews versus anything else around. Personally I’d pay to get it up, but I need it on my site. My primary reason for wanting to use it is so I can send out reminders to persons that like to be late with their payments.
So first of all we need to install Laravel on HostGator.
That guide works nicely for the install - and I got it installed - but I realized thereafter that it wanted me to move the contents of PUBLIC to my PUBLIC_HTML folder. This suggests that Laravel and whichever other app would completely take over my site (correct me if I’m wrong there). As a result of that I didn’t do it. After using PUTTY to get it installed it’s just sitting there.
Now I have InvoiceNinja tucked away in www.mysite.com/ninja and I’ve tried to access it as suggested in other parts of the forum by using www.mysite.com/ninja/public but I get errors.
www.mysite.com/ninja/ - blank page
www.mysite.com/ninja/public/ - 500 internal error
So I’ve used HostGator’s cPanel to create a new database and edit the file /public_html/ninja/config/database.php to point to this new database. Same results as above - blank page or 500 internal error.
Now I’ve found this other link:
That provided some insight - but for someone that knows nothing (not next to nothing - nothing) about PHP/Laravel this is difficult. I’ve setup (and purchased) other invoice apps which work fine - but their reminder options just do not work. Cron jobs setup but it still doesn’t work - other cron jobs work fine however - and HostGator’s support on this matter is limited to “ask your web developer for assistance”.
So let’s see if it’s possible to get this working. I’ll add screenshots as we go along or later if we manage to get this up and working. Thanks in advance - hope to hear back from someone soon.
I don’t know about host gator, but I have installed on a few shared hosts, and it was done by unpacking the zip in the directory of choice and editing the env file. Not had any errors so far.
Does your cpanel not have softaculous or instalatron? If it does you can install Invoice Ninja from there.
You don’t need to install Laravel to use Invoice Ninja.
If you see 500 errors I’d suggest checking storage/logs/laravel-error.log and your web server error logs for details about the error.
@billyggla - I’ll do the process over and record it to show. But there is no softaculous or instalatron.
@Hillel Coren - There is no error in the logs folder.
Video of what was done will be available below - currently uploading.
Not sure, from my experience if you see a 500 error there will be an error logged to either the Laravel or web server error log files.
The env file will be a hidden dot file.
You should be able to find it if you include hidden files in the search, or use an ftp client like filezilla.
OK. I’m going to check for the file now. After finding it what do I do with it?
Add the database details and other info to the env file.
I just checked using FTP and I don’t see that file. I see other hidden files but no ENV. Is it possible to link to a standard copy of the file? I’d just edit it and put in the details.
If it is missing, you can get the env.example from github and rename it to .env
OK. Did that (from my phone) and now /ninja loads a blank page but /ninja/public seems to reflect my main site. Did I do something wrong here?
I’ll get to it and try from my PC later.
Try uncommenting the rewrite rule in .htaccess
Going to try from my PC because from my phone the file is blank. No idea why.
Just read this again, I assumed you were moving your Invoice Ninja install to another host.
If this is a fresh install, I would suggest downloading the zip again in case it was corrupted. You should have got the setup screen where you would have entered the database details and added a user.
Thanks for that. Will try. Could someone post the MD5 or CRC for the file? Want to ensure it’s good.
So the file was uploaded and extracted. Think I see where the issue was - when the files are moved using the file manager GUI it may not have moved the hidden files in the main folder. So I extracted to /public_html and then used it from there. The folder name was fine so no need to rename. Then connect with FileZilla and get the .env.example and .htaccess files. Edit with Notepad++ as needed and put them back. And now - back to square one.
As I’m working with defaults until I get the thing working - here are the changes made. I’ve not changed anything in the .htaccess file so far - only the .env file. I’ve not changed anything else yet - email and all that will be done after.
Going to http://mysite.com/ninja once again gives a blank page and http://mysite.com/ninja/public goes back to the 500 error. Currently editing the file at /public_html/ninja/config/database.php to see if that makes a difference.
So since that didn’t work I’m trying to get to HostGator support on the matter. If any other suggestions are sent I’ll try them. I’m also having an interesting error where FileZilla is reporting too many connections from my IP - so can’t get anything from the site - can browse it though.
So I changed things up a bit - created a sub-domain called ninja.mysite.com and set the redirect to /public_html/ninja - now it loads with a 403 forbidden error. Things changed are listed below.
Wondering if I should change the APP URL from the actual URL to the location public_html/ninja?
OK - so if I change:
RewriteRule ^(.*)$ public/$1 [L]
RewriteRule ^(.*)$ public/$1 [L]
The error changes FROM:
You don’t have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache Server at ninja.catsinja.com Port 80
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, firstname.lastname@example.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Apache Server at ninja.catsinja.com Port 80
I’ve tried to check for logs on HostGator but there seems to be none. The only errors that popped up happened when I was there playing with the file/folder permissions. Also when I deleted everything and tried to access it before re-extracting and running the correct configuration settings. Aside from these there are no other errors. None. So…not sure what to do at this point. Waiting on some other suggestions.
[Wed Oct 03 23:30:09 2018] [error] [client 184.108.40.206] SoftException in Application.cpp:313: File “/public_html/ninja/public/index.php” is writeable by group
[Wed Oct 03 23:30:04 2018] [error] [client 220.127.116.11] SoftException in Application.cpp:313: File “/public_html/ninja/public/index.php” is writeable by group
[Wed Oct 03 23:30:01 2018] [error] [client 18.104.22.168] File does not exist: /public_html/irs/tasks
[Wed Oct 03 23:29:43 2018] [error] [client 22.214.171.124] SoftException in Application.cpp:313: File “/public_html/ninja/public/index.php” is writeable by group
[Wed Oct 03 23:29:25 2018] [error] [client 126.96.36.199] SoftException in Application.cpp:313: File “/public_html/ninja/public/index.php” is writeable by group
[Wed Oct 03 23:28:52 2018] [error] [client 188.8.131.52] SoftException in Application.cpp:313: File “/public_html/ninja/public/index.php” is writeable by group
[Wed Oct 03 23:28:39 2018] [error] [client 184.108.40.206] SoftException in Application.cpp:313: File “/public_html/ninja/public/index.php” is writeable by group
[Wed Oct 03 23:28:31 2018] [error] [client 220.127.116.11] File does not exist: /public_html/ninja/404.php
[Wed Oct 03 23:28:31 2018] [error] [client 18.104.22.168] File does not exist: /public_html/ninja/public
Thanks for the error details, the “is writeable by group” error implies the problem is related to permissions.