skip to Main Content

Can't set cookie php

I am trying to add a cookie in my add_cookie.php file like so: <?php setcookie("TestCookie", 'epic_test', time()+3600); exit('cookie set'); But when accessing https://my-site.com/add_cookie.php I do see the "cookie set" text, but the cookie is not in fact set. Why is…

VIEW QUESTION

Php – setcookie() default secure=true

In php.ini where can I set the default "secure" parameter value to true for the setcookie() call(): https://www.php.net/manual/en/function.setcookie.php#:~:text=match%20all%20subdomains.-,secure,-Indicates%20that%20the Tried modifying session.cookie_secure but that seems to only apply to session cookie not regular cookies set by setcookie(...);

VIEW QUESTION
Back To Top
Search