SOLVED Can't login to a laravel script properly

Denis Gomes Franco

Well-Known Member
Sep 3, 2018
45
7
8
Tupã, São Paulo, Brazil
cPanel Access Level
Root Administrator
Hey.
This isn't strictly a problem with Cpanel or even Apache, but I don't know where to turn to help.

I do use an open source invoicing script called Invoice Ninja that was developed with Laravel and PHP. It was running just fine on my previous server (Plesk) but ever since migrating it to Cpanel I can't log in to Invoice Ninja.

Developer said that it might be some corrupted file so I uploaded new files but that didn't help. After putting in my password, the browser briefly display the message 'Redirecting to <domain>/dashboard' (that message never appeared before) and then redirects me back to the login.

I thought about it having something to do with PHP or Apache session cookies or something but couldn't figure this out. Server time is correct, browser says cookies are okay and not expired. Database settings are correct. Checked which Apache and PHP modules are installed, they seem correct. Domain configuration and SSL seems to be alright (BTW, I'm running this off a subdomain, and when moving to Cpanel I kept using the sabe subdomain). Error logs show nothing about this. Tried clearing Invoice Ninja's cache to no aval.

I would like to debug the .htaccess file but have no idea how. What draws my attention really is that 'Redirecting to...' message that never appeared before. Maybe that has something to do with a security module on Apache or a security setting on WHM?

For those who don't know, Laravel puts some core files inside the root folder and the main app files inside a /public/ folder, so I need to set the document root to /public/ for it to work properly. As far as I know, everything is really set up correctly.

And by the way, I had no problems at all with my Wordpress sites. No login issues, no nothing.

Any ideas? I'm willing to give access to my server so someone can look into it. I really need to put this back on, I've developed a billing backlog.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Error logs show nothing about this.
Hello @Denis Gomes Franco,

Can you verify which specific error logs you checked? Did you check both the error_log file within the document root where the script is located, and the global Apache error log (/usr/local/apache/logs/error_log)?

Also, can you reproduce the issue across multiple PHP handlers (handlers are configured in WHM >> MultiPHP Manager)?

Thank you.
 

Denis Gomes Franco

Well-Known Member
Sep 3, 2018
45
7
8
Tupã, São Paulo, Brazil
cPanel Access Level
Root Administrator
Hi Michael, thanks for getting back.

There are no errors whatsoever, anywhere, regarding this specific issue. I'm almost sure there is something missing in the server configuration: an Apache module or a PHP extension, or some setting, I'm not sure.

I have two handlers, PHP 5.6 and PHP 7.2. If I switch to PHP 5.6, first it was throwing a 503 error, then a few moments later just a blank page. And still no errors show up on the log.

I also tried creating a new subdomain and copying the script's files there (maybe the subdomain was configured incorrectly or something) but that didn't help either.
 

Denis Gomes Franco

Well-Known Member
Sep 3, 2018
45
7
8
Tupã, São Paulo, Brazil
cPanel Access Level
Root Administrator
So, any ideas? I really really need to make this work, I'm getting a backlog of things I need to do in Invoice Ninja. I can't seem to find an error anywhere on all the logs files, including Laravel's logs.

By the way these are the last lines in the raw log:
141.101.69.117 - - [26/Feb/2019:12:43:16 -0300] "GET /dashboard HTTP/1.1" 302 404 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0"
141.101.69.117 - - [26/Feb/2019:12:43:17 -0300] "GET /login HTTP/1.1" 200 3700 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0"
141.101.69.117 - - [26/Feb/2019:12:43:27 -0300] "GET /dashboard HTTP/1.1" 302 404 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0"
141.101.69.117 - - [26/Feb/2019:12:43:28 -0300] "GET /login HTTP/1.1" 200 3700 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0"

Notice that when it tries to access Invoice Ninja's dashboard it goes right back to the login (after briefly display that 'Redirecting to' message).

I'm out of ideas, I'm nearly deploying a new server just to run this thing.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Hello @Denis Gomes Franco,

We generally recommend contacting your license provider first (or the provider you purchased the license from in your case) to see if they can determine the cause of the problem. If they are unable to help, you can still open a ticket directly with us by creating a Manage2 account and using the following URL:

cPanel Customer Portal

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Hello @Denis Gomes Franco,

To update, it looks like this was caused by a custom translation that was enabled as part of your script. Can you confirm if the issue is now solved?

Thank you.
 

Denis Gomes Franco

Well-Known Member
Sep 3, 2018
45
7
8
Tupã, São Paulo, Brazil
cPanel Access Level
Root Administrator
Hey Michael,

Actually the translation file (which is a regular PHP file) had a minor mistake that took down the whole thing. Unfortunately there was no errors logged anywhere so this issue took way too long to be discovered. Anyway I noticed this when uploading a new release of Invoice Ninja that came out this morning and accessed it before uploading my customized translation.

I'm sorry for making you guys waste your time, and thanks a lot for your help!
 
  • Like
Reactions: cPanelMichael