K
K
krnkazaryan2014-06-23 01:07:36
Opera
krnkazaryan, 2014-06-23 01:07:36

How to connect cookies from a subdomain to the main domain and other subdomains in Opera?

Good day to all developers.
There was such a question.
I just can’t find a way to pick up a cookie from subdomains for the entire domain under the Opera browser.
The code that I write on my site:
PHP:
copy the code to the clipboard

session_set_cookie_params(360000, '/','.moidoman.ru',false,false);
session_name($session_name);
session_start();
if (session_id()==$session_id) {
   Наш человек
}
else {
      session_destroy();
      session_set_cookie_params(360000, '/','.moidoman.ru',false,false);
      session_name($session_name);
      session_id($session_id);
      session_start();
}

This code does not work due to the fact that Opera, if you go not to the main domain, but to a subdomain, does not accept cookies and thus the entire process of recording a session in the database is not implemented. In all browsers (Firefox and Chrome) it works as it should, but Opera does not.
Can anyone suggest a way to implement this logic and under the opera?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lisonok, 2014-06-23
@Lisonok

Similar problem runet-dev.ru/topic1998.html

K
krnkazaryan, 2014-06-23
@krnkazaryan

Doesn't work without a dot either.
Although there are certain shifts.
Already accepts a cookie, but only for the main domain it becomes registered. Accepted cookie is not returned when accessing subdomains

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question