Answer the question
In order to leave comments, you need to log in
Why can't sessions be saved via set_tempdata in CodeIgniter?
There is a site in 2 versions - Russian *.ru and English *.com. Powered by CodeIgniter. In order not to constantly copy files from one domain to another, I fueled the whole thing with the help of hard links to the 3rd "shared" directory, separately created in the same place as the first 2 sites. Set up hard links to Application and System. Separately, in the directory with each site (NOT "shared"), I placed the base index.php, supplementing it with a constant with the locale (RU or EN, respectively).
It turns out that I work in the "shared" directory, and the sites are directly fed from it. Already in "shared" I implement work with one or another language according to a given constant with the locale.
There was a problem with sessions. Somehow the underlying ci_session works and holds the value for the duration of the connection,
Sites are on regular hosting from REG.
Does anyone have any ideas how to solve the problem?
Answer the question
In order to leave comments, you need to log in
Solution: specify in the config.php file for the sess_save_path variable the absolute path to the directory where the sessions will be stored!
It is important to understand that sessions for different domain names (example.ru, example.com) cannot be combined due to the peculiarities of storing sessions. This is only possible when using subdomains (ru.example.com, en.example.com).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question