0

I can't log in and I don't understand why. I tried a lot of thing since 4 days. I use git. The problem exist only onto the web server. Onto my test environment, every thing just work fine. When I try to log in onto the server, I am getting no error into the log.

Test : Windows 10, with Vagrant, Homestead, Laravel 5.3, php 7.0

Server : Cloudways, Laravel 5.3, php 5.6

I am using the Auth system from laravel and I can log in for few seconds when I use the remember me checkbox. After the delay, it kick me out. I don't understand what happen, because the only difference between the 2 server is the .env file. I just did a backup to the creating date of the server, redeploy the with git and I also did a MySql dump to have everything as it's on the Test one.

For sure, I did all these command line :

php artisan clear-compile php artisan config:clear php artisan config:cache composer dump-autoload php artisan session:clear php artisan view:clear php artisan cache:clear

Please help me.

EDIT I just made some change into the code. But first, I need to explain a little more the problem. I realised that I can login if I use "remember me" checkbox. The things is I was not kicked out. I got token mismatch error line 67 on every post. The issue was, instead of adding a csrf field into every different forms, I added a meta field with the token in the layout. Now, my post work fine.

I'm still not able to login if I don't use the checkbox remember me... (Just put it checked by default...) Still looking for the issue.

Moyed Ansari
  • 8,436
  • 2
  • 36
  • 57
Elie Morin
  • 1,456
  • 3
  • 15
  • 35
  • 1
    Make sure you have given the permission to the folder storage/logs on the server – Vikash Sep 26 '16 at 20:42
  • Is your local version in development and your remote in production? Put your local into production- run your commands above and report the outcome back here if this is the case. – Jonathan Sep 26 '16 at 20:43
  • @Vikash I always forgot about this one... But I don't understand why it worked for 2 weeks then it stop... Now it's good. Jonathan Both are in production. Now everything work fine... But I don't really understand why. – Elie Morin Sep 27 '16 at 18:37
  • 1
    Its better you write a bash command for this, I mean when you pull your code on server then all these cache clear things with all required permission by running a singe command. – Vikash Sep 27 '16 at 18:41
  • @Vikash You're right, I'm gonna save a lot of time! Thank you for the idea! – Elie Morin Sep 27 '16 at 19:11

1 Answers1

0

I'm not sure but it can be related to the PHP version on cloudways. Laravel 5.3 requires PHP 5.6.4 or higher (according to https://laravel.com/docs/5.3/upgrade) but I think the PHP version on cloudways is 5.6.2

Mehdi
  • 1