Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jim1506's avatar

5.3 - Problem transferring from localhost to site

I have been developing a system on my local machine and have just uploaded it to the site in question. When I try to login I get: TokenMismatchException in VerifyCsrfToken.php The login page is generated by artisan and has {{ csrf_field() }}

0 likes
10 replies
tomopongrac's avatar

It is probably something with session config ...

does your session folder fully writable

jim1506's avatar

I have just checked and I assume you are talking about: storage\framework\sessions which is set to 777

tomopongrac's avatar

yes, i mean to that folder ... can you check do you have files in that folder because if you dont have files that mean that session info not stored correcty ...

also try to delete cookie from site...

you can also try to delete all files inside "storage/framework/cache" and "storage/framework/sessions" and than try again

jim1506's avatar

I deleted everything as you suggested but still a problem. It is storing things in the session directory.

Would it help if you saw the site and ftp?

tomopongrac's avatar

check the domain you have set in config/session.php file, it should be null

jim1506's avatar

It is

'domain' => env('SESSION_DOMAIN', null),
jim1506's avatar

There is no session_domain setting. I tried changing

APP_URL=http://xmasterpro.com

as it was localhost by default but it made no difference

jim1506's avatar

Thanks to everyone. I am following the instructions in the discussion, although I am beginning to think VPS is the answer!

Please or to participate in this conversation.