Answer the question
In order to leave comments, you need to log in
How to make single sessions for Node.js and PHP on Redis?
Hello, such a situation:
There is a server on Node.js and a site on PHP. It is required to use shared sessions ($_SESSION). In node.js, I achieved the use of sessions in redis using connect-redis.
app.use(session({
store: new RedisStore({
// this is the default prefix used by redis-session-php
prefix: 'session:php:'
}),
// use the default PHP session cookie name
name: 'PHPSESSID',
secret: ' ',
resave: true,
saveUninitialized: true
}));
require('/common/redis-session-php/redis-session.php');
RedisSession::start();
Answer the question
In order to leave comments, you need to log in
great game with cookies (only) for linking sessions between each other
I no longer see solutions
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question