I am trying to save a URL as the value inside a web browser cookie. The URL is: https://www.instructables.com/json-api/getIbleStats?id=EVHUTKMJ4OFY92W I get URL input using this code: echo ‘<…
Tag: cookies
How can I resolve a cross-site Google Analytics cookie `SameSite=None` warning in Chrome on Apache 2.4 and PHP 7.1?
My client’s website is getting these SameSite cookie warnings in Chrome. I’ve searched all over and I can’t get the warnings to go away. The cookies are due to Google Ad Conversion Tracking on a Wordpress Site. The site is on a Apache/2.4.7 (Ubuntu) hosted by DreamHost running PHP 7.1 for compatibility reasons. To my .htaccess file, I’ve tried adding:
How to set a cookie with the secure flag in PHP?
I want to set the httponly and secure flag true in my code but when i am trying to set that cookie. In that case cookie is not created and am unable to login to site. ini_set(‘session.cookie_httponly’…
Cookies not set using PHP setcookie function
I’m using the setcookie php function to set some cookies in my browser. I try to set cookies in my php code and then I check it using print_r($_COOKIE). Cookies are not displayed, however if I try to …
Woocommerce Session cookie not set on ajax when using admin-ajax.php
I have a Wordpress ajax function which is using the WC()->session to take session data and use it in the function. (for exmaple taking chosen shipping method from the session and displaying it). The …
Can’t login with Symfony Guard, maybe because of cookies & multidomain
I need a very simple form login, so I’m using a Symfony Guard authenticator for this. My application is multi-domain, for now login is possible on only 3 of them (and 2 are subdomains). But I can’t log in on any of them. First, here are some resources: The authenticator: FormLoginAuthenticator.php My security configuration: [https://gist.github.com/Pierstoval/1e29a9badab1cba03e45a306aa658c83#file-security-yaml) And in case it’s needed,
Destroy cookie when browser window closes PHP
I have created a popup in WordPress that will open when visitor IP is from Australia. The popup will show up on page load. I want to make it not show until the browser screen is closed. For this, I used the cookie. I set the cookie when the close button is clicked and creating the cookie in PHP using
Cookie aren’t saved
I need to save a cookie, I’m trying to do this with setcookie function, I did: in the browser there is no cookie saved, why? Answer Some of your settings are wrong. I’ve corrected can you try?
Setting Cookie on click
I’m having an issue creating / setting a cookie on the click of a link, is there a proper way to do this? Either PHP or Javascript is fine. Obviously both JS and PHP wouldn’t exist in the same instance it was just to show what I have. Answer You can’t mix JavaScript and PHP. By the time your JavaScript
Magento cookie settings for subdomain
When I am installing Magento under a subdomain of my production domain, I cannot login to magento admin. For example, my domain name is example.com where I have installed magento and it is in production, I am ok with admin login. However, I have a subdomain called test.example.com and I installed magento there for testing purpose. Now, if I try