Authentication not working on shared hosting (Hostgator)
I deployed my first application to Hostgator, everything works fine except for authentication.
Credentials are validated correctly but then the function auth::check always fail to false.
Anyone experienced that problem?
Thanks,
Esteve.
Something to do with sessions then. Check they're enabled and working in the PHP version.
Thansk Bashi, but after reading and googling a lot nothing appears to be wrong.
What I've tested is that when testing the login harcoded: Auth::login(User::find(1)); everything works fine.
But I do not know what I can get with this. Is something wrong with Hostgator? With Laravel source?
Any help appreciated.
Is your primary key for users table different from id?
You can set it with this if needed
protected $primaryKey = 'ID';
hmm,, if the manual login works well then the problem is session.
check server information using phpinfo() function.
==== index.php ===
<? echo phpinfo(); exit
.....
and see what it says.
Hi guys, first of all thank you for helping me.
Do you have a cookie plugin on your browser so you can check sessions?
Looks like PHP has sessions enabled but it won't say if the directory is not writable etc.
@egraells did you look at your log files. Maybe there are errors described?
@wiggerl3000 Server Log files are empty, my laravel log file does not show any relevant info.
@bashy I see files created on the folder /app/storage/sessions as expected. May be you mean other folders on the server?
Never mind, Laravel doesn't use native PHP sessions? Make sure that storage folder is fully writable from the web user (or 777 if you want to).
Other than that, I'm lost.
Please or to participate in this conversation.