Share session between my site and WP blog

I am using Yii framework for a web site and WP for a blog (don’t ask why, I inherited this project). Yii is responsible for users (login/logout…), and in the blog (WP), I need to know when the user is logged in.

I tried setting session in Yii, $_SESSION['key'] = $value, and reading it in WP, but WP doesn’t see the session: echo $_SESSION['key']

The domain for the site is example.com, and for the blog is example.com/blog.

Is it possible to share a session this way?

Solutions Collecting From Web of "Share session between my site and WP blog"