Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
I have set a cookie from domain (.example.co) and its .NET platform & reading those cookie from drupal site(test.example.co).
While retrieving it shows empty, I have used $_COOKIE.
This link suggests it is possible, also we are setting domain name while creating cookies? Is it possible to use while retrieving cookies?
Also i have found this link, is that interrelated?
asked Apr 11, 2018 at 9:25
Prasanth RPrasanth R
13711 gold badge11 silver badge1111 bronze badges
You need to provide an appropriate value for
$cookie_domain in settings.php.
$cookie_domain = 'example.co';
That will allow you to set/retrieve cookies from example.co on foo.example.co, and vice versa.
answered Apr 11, 2018 at 9:31
165k1717 gold badges296296 silver badges330330 bronze badges
In order to use other subdomains' cookies, you need to set both site's cookie domain to .example.com.
answered Apr 11, 2018 at 10:05