Sharing sessions between codeigniter projects

There are two different projects developed on a code-digger. I want to share a session repository between these projects. $config['sess_cookie_name'] = 'ci_session';The configuration file is the same for both. But when I update one of them, all data is automatically deleted from another project. I can not solve this problem. #help

+6
source share
3 answers

The solution was found here: cross-domain cookies - create a single login portal and then redirect users to the appropriate areas. It is not possible to exchange cookies (the basis for sessions) between domains, so you need to find an alternative solution. Centralizing your login and verification process should solve this problem.

0
source

There are two ways to do this.

  1. - . cookie $_SESSION . cookie : $_POST $_GET, , , $_GET. , :

    • , . , , .
    • , . PHP , .
  2. $_SESSION, , . , - , .

, , , .

0

; .

https://codeigniter.com/user_guide/libraries/sessions.html#database-driver

:

Codeigniter (CI) . , , Redis .. ; ; .

. , .

application/config/config.php " ".

$ config ['sess_driver'] = ' '; & lt; -

$ config ['sess_save_path'] = 'ci_sessions'; & lt; -

.

0

Source: https://habr.com/ru/post/1686854/


All Articles