Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED Can't login to a laravel script properly

Discussion in 'General Discussion' started by Denis Gomes Franco, Feb 25, 2019.

  1. Denis Gomes Franco

    Denis Gomes Franco Active Member

    Joined:
    Sep 3, 2018
    Messages:
    32
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    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.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,009
    Likes Received:
    2,123
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Denis Gomes Franco

    Denis Gomes Franco Active Member

    Joined:
    Sep 3, 2018
    Messages:
    32
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    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.
     
  4. Denis Gomes Franco

    Denis Gomes Franco Active Member

    Joined:
    Sep 3, 2018
    Messages:
    32
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    Tupã, São Paulo, Brazil
    cPanel Access Level:
    Root Administrator
    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.
     
  5. Denis Gomes Franco

    Denis Gomes Franco Active Member

    Joined:
    Sep 3, 2018
    Messages:
    32
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    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.
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,009
    Likes Received:
    2,123
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @Denis Gomes Franco,

    Can you open a support ticket so we can take a closer look at the affected system? You can post the ticket number here and I'll link this thread to it.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Denis Gomes Franco

    Denis Gomes Franco Active Member

    Joined:
    Sep 3, 2018
    Messages:
    32
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    Tupã, São Paulo, Brazil
    cPanel Access Level:
    Root Administrator
    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.
     
  8. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,009
    Likes Received:
    2,123
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Denis Gomes Franco

    Denis Gomes Franco Active Member

    Joined:
    Sep 3, 2018
    Messages:
    32
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    Tupã, São Paulo, Brazil
    cPanel Access Level:
    Root Administrator
    Hi Michael,
    Tried a lot of things, no solution. So here's the ticket: 11540811.

    Thanks!
     
  10. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,009
    Likes Received:
    2,123
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. Denis Gomes Franco

    Denis Gomes Franco Active Member

    Joined:
    Sep 3, 2018
    Messages:
    32
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    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!
     
    cPanelMichael likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice