Answer the question
In order to leave comments, you need to log in
How to set a common domain for creating sessions on subdomains in php?
There are two subdomains main.site.ru and api.site.ru . Main is for the frontend and api is for the backend. They communicate through ajax requests. The service has authorization through sessions. The session is created on api.site.ru and, accordingly, requests from the main.site.ru domain do not have this session.
How to configure sessions in php so that they are created for the site.ru domain and work on subdomains?
upd: it seems to be done through this thing php.net/manual/ru/function.session-set-cookie-para...
I would be grateful if someone writes with an example, since I myself am not strong in server languages.
Answer the question
In order to leave comments, you need to log in
no way. You can only on site.ru make a session to the domain .site.ru
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question