3

Laravel version 4.1

Works perfectly fine on the server and on the domain, but I wanted to take it into development to my localhost and I can't log in. I don't get error messages, nothing to log and nothing happens, expect I'm redirected back to /login page when I try to log in. I have changed session.php, database connection to my localhost database and app.php pointing it to http://localhost (I have also tried to point it to localhost and http://127.0.0.1). Database connection works, login page (which is the front page) loads. File permissions in /app/storage are correct.

The script is using Sentry2 for authentication. Any ideas what I could try?

Gustavo Straube
  • 3,744
  • 6
  • 39
  • 62
EmJeiEn
  • 1,343
  • 5
  • 17
  • 30
  • Unless you can get an error, you're really asking for some blind debugging here. Are you sure you've got a user account? Have you tried signing up? – tadman May 14 '15 at 15:56
  • Yep, user exists and yes, I tried. When I sign up the new user is made into the database, but I am redirected back to page login page (default page) as soon as it's executed. I don't really know where to begin and how can try to dump auth sessions in laravel at all to see what is going on. But I guess that's the next step to take somehow. – EmJeiEn May 14 '15 at 16:01
  • Since you've posted zero code, have no error messages, and can't describe any way for someone else to reproduce this, it's really hard to say what's wrong. – tadman May 14 '15 at 16:02
  • I totally get that, was thinking posting code wouldn't help at all since it's working perfectly fine on production server but this happens in localhost so maybe there would be some setting what I'm missing in laravel where to set this up or what to check. – EmJeiEn May 14 '15 at 16:07
  • check error log of your webserver(apache/nginx) in localhost – Khan Shahrukh May 14 '15 at 16:08
  • @KhanShahrukh nothing there either. – EmJeiEn May 14 '15 at 16:09

1 Answers1

7

Ok, actually figured it out. It was a setting.

For those with this problem possibly in the future, in session.php set Session cookie domain to:

'domain' => "",

I had it on localhost or as ip before and it didn't find the sessions, therefore causing the problem I had.

EmJeiEn
  • 1,343
  • 5
  • 17
  • 30