[GH-ISSUE #104] Cypht does not play nice with other applications #85

Closed
opened 2026-02-25 21:34:06 +03:00 by kerem · 1 comment
Owner

Originally created by @L3CC on GitHub (Aug 10, 2016).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/104

Originally assigned to: @jasonmunro on GitHub.

I was trying to call Cypht from another web app and found that each time Cypht login page was called the other app session's data was lost. Checking the code I found that all session data is cleared by Cypth at login page. I can understand why but I also needed to keep previous session data. I've also found that, when clearing session data, Cypht expects 'session.name' to always be 'PHPSESSIONID', which is not correct. Sometimes is something else. However the solution for both cases is not difficult.

Add the following to lib/ini_set.php:
ini_set('session.name', 'CYPHTID');
Then edit lib/session.php and modules/core/setup.php and replace 'PHPSESSIONID' by 'CYPHTID'.

This way not only existing session data, from other apps, is preserved but Cypht will properly set and clear it's own session data when PHP session name is not standard.

Originally created by @L3CC on GitHub (Aug 10, 2016). Original GitHub issue: https://github.com/cypht-org/cypht/issues/104 Originally assigned to: @jasonmunro on GitHub. I was trying to call Cypht from another web app and found that each time Cypht login page was called the other app session's data was lost. Checking the code I found that all session data is cleared by Cypth at login page. I can understand why but I also needed to keep previous session data. I've also found that, when clearing session data, Cypht expects 'session.name' to always be 'PHPSESSIONID', which is not correct. Sometimes is something else. However the solution for both cases is not difficult. Add the following to lib/ini_set.php: ini_set('session.name', 'CYPHTID'); Then edit lib/session.php and modules/core/setup.php and replace 'PHPSESSIONID' by 'CYPHTID'. This way not only existing session data, from other apps, is preserved but Cypht will properly set and clear it's own session data when PHP session name is not standard.
kerem 2026-02-25 21:34:06 +03:00
  • closed this issue
  • added the
    bug
    core
    labels
Author
Owner

@jasonmunro commented on GitHub (Aug 10, 2016):

Hello! Thanks for the great feedback. I just committed your suggested changes in github.com/jasonmunro/hm3@ed8385fb3d

<!-- gh-comment-id:238900665 --> @jasonmunro commented on GitHub (Aug 10, 2016): Hello! Thanks for the great feedback. I just committed your suggested changes in https://github.com/jasonmunro/hm3/commit/ed8385fb3d01544030482fd06bcebb0c8ac0dbd1
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#85
No description provided.