Skip to content

Tag: cookies

Laravel : Set cookie for parent domain

I’m trying to build an SSO that will be shared between different applications with the same parent domain. Say we have these domains : sso.example.com Unified login page app1.example.com Some other application that will redirect to the login page When I set SESSION_DOMAIN=.example.com in .env file of th…

PHP: CURL fails to save cookie

I am using PHP from one host to connect to the API of another on the same subnet, which requires cookies to remember the login. It gives me a WARNING: failed to save cookies in /var/includes/cookie. I set up a short test script for myself as follows: The verbose log file gives me this output: The contents of …

Cookie is not recognised in PHP

I get Notice: Undefined index: i during the first reload of page with cookies if( (isset($_COOKIE[“i”])) && !empty($_COOKIE[“i”]) ){ setcookie(“i”,$_COOKIE[“i”]+1); } else{ …