Can't login to a laravel script properly
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 /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.
-
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.0 -
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. 0 -
But what's truly bothering me is that 'Redirecting to...' message that wasn't there before. Where did this came from? Maybe this is what's causing the problem. 0 -
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. 0 -
Tried opening it via WHM but says here that my license provider is Choopa LLC and so I need to get support from them. Got the license via Vultr, by the way. 0 -
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 cPanel Customer Portal Thank you. 0 -
Hi Michael, Tried a lot of things, no solution. So here's the ticket: 11540811. Thanks! 0 -
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. 0 -
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! 0
Please sign in to leave a comment.
Comments
10 comments