Self hosted -got login page but cannot login

Hi …I had installed Invoice Ninja in shared hosting using Softaculous …initially, it wasn’t working …after creating a subdomain and corrected the index file by studying Laravel installation, finally, i m able to get the log-in page…but when I give the email ID and password set on DB as user,i m not able to log in …based on one forum I m also tried below steps
Run php artisan tinker in the root folder of the app and then bcrypt('new password');

still, i m not able to log in

i m getting error as 401: These credentials do not match our records

The fields i have on login page are
Email - Given the email ID in the user table of DB
Password - Given the password reset using php artisan tinkerin the root folder of the app and thenbcrypt(‘new password’);
OTP (Optional)
Secret(Optional)

while checking Laravel log all I m getting the below error…since I m new here not sure what to do.

[2021-04-13 17:18:15] production.INFO: Illuminate\Support\MessageBag Object
(
[messages:protected] => Array
(
[password] => Array
(
[0] => The password field is required.
)

    )

[format:protected] => :message

)

Hi,

Can you explain what you mean by “corrected the index file by studying Laravel installation”, you shouldn’t need to make any changes to the index file.

Hi Hillel,

Thanks and appreciate your prompt reply…!

Let me explain what i did initially and what had done later.

I had installed Invoice Ninja using Softaculous as a normal installation inside my public_html folder on my shared web hosting in a subdirectory called “invoice”.After all, when i called the URL Softaculous instalation wizard provided i got an internal server errror.(https://mydomain.com/invoice)

I had referred few Laravel installation videos on youtube …based on one of the installation guides i had done the below changes.

moved out public folder from invoice folder to pubilc_html folder and made a modification on the index.php of public folder on below two lines,.

require DIR.’/…/invoice/vendor/autoload.php’;

$app = require_once DIR.’/…/invoice/bootstrap/app.php’;

Also, I had created a subdomain and point the root folder of the subdomain to the /public_html/public.

Now i am able to get the Ninja log in page…but cannot log in.

Now my current folder locations

Invoice Ninja files except public folder are under /public_html/invoice

Invloce ninja public folder is under /public_html/

As i m new kindly guide me to get it works.

Once again Thanks for your help.

Ninjascreen

Thanks for the details!

I suggest setting up a clean install and then sending us the error details from the logs to help debug the problem. Once you start making changes to the app it puts it in an unknown state which makes it difficult to support.

Note: the Softaculous install should work out of the box, you may want to contact Softaculous directly to ask them.

Thanks Hillel…I will do a clean install now and will share the details soon…Is the subdomain is mandatory to get it works or just install on sub directory also will work…?

I believe either setup should work.

Hi Hillel,

I had done fresh install…now the login page is showing below error…no logs in storage folder…!

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@invoice.coastalfresh.in to inform them of the time this error occurred, and the actions you performed just before this 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.

Are there any details in the web server error logs?

It could be a permissions issue.

All i can see on log is this

[15/Apr/2021:07:43:33 +0000] “GET /invoice HTTP/2.0” 301 240 “https://cp-in-20.webhostbox.net:2083/” “Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36” coastalfresh.in 119.xx.xx.xx
182.72.164.130 - - [15/Apr/2021:07:43:33 +0000] “GET /invoice/ HTTP/2.0” 301 256 “https://cp-in-20.webhostbox.net:2083/” “Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36” coastalfresh.in 119.xx.xx.xx
182.72.164.130 - - [15/Apr/2021:07:43:34 +0000] “GET /invoice/public/index.php HTTP/2.0” 500 669 “https://cp-in-20.webhostbox.net:2083/” “Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36” coastalfresh.in 119.xx.xx.xx
182.72.164.130 - - [15/Apr/2021:07:43:34 +0000] “GET /favicon.ico HTTP/2.0” 404 358 “https://coastalfresh.in/invoice/public/index.php” “Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36” coastalfresh.in 119.xx.xx.xx

That looks like the access log, not the error log.

@david do you have any ideas?

not sure on this one.

After reinstalling when i call the URL i m getting now this screen…hope it will help to identify the issue …??

ninja3

Maybe you need to add /public to the URL?

https://coastalfresh.in/invoice/public

No.luck

You may want to try a different installation option like Softaculous or Docker

Hi Hillel…I did through Softaculous only on my shared hosting cpanel…I did several other apps simple as a matter of minutes…But this made me crazy…!!!
.

Hi I had the same problem when setting up on a subdirectory, just couldn’t get it to work. So I’m now using a subdomain billing.example.com It works so much better.

1 Like

Hi Zoup… Great…I tried that also…But had no.luck…How is your directory structure.?..All.invoice ninja files on public_html folder?.or outside of that and only public folder inside public_html?.How you point your subdomain root folder?..Pls guide.

Bro I’m using docker so all that is done for me automatically, it was too difficult to set up by hand.

But if i had to guess I would say only the “public” directory should be public (not “storage”). Also I assume from your use of public_html that you’re using apache? I had more luck with nginx.

The way I had it was everything was in /var/www/invoiceninja/ and nginx served /var/www/invoiceninja/public ONLY. Everything else was lcoked down.

But with docker all those problems disappeared, and a subdomain in nginx and docker is easy.

I know it’s not what you want to hear :frowning: I was in your situation too. That’s why I commented! Good luck

Just rememberd if you using nginx there are also samples in the docker repo on github and it worked for me without any trouble…