Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] PHP Sessions - custom.ini #79

Open
pdunne opened this issue Apr 19, 2024 · 0 comments
Open

[Suggestion] PHP Sessions - custom.ini #79

pdunne opened this issue Apr 19, 2024 · 0 comments

Comments

@pdunne
Copy link

pdunne commented Apr 19, 2024

Hi,

I am testing your docker image internally and I came across an issue with sessions.

I'll start with the solution I found to my problem:

I added this to custom.ini in the ./config subfolder
session.auto_start = 0

I also made sure to add this to /usr/local/etc/php/conf.d/custom.ini inside my docker image before restarting it (since I already had a running image).

Problem
If I remained logged in on a device, which then went to sleep, or internet connection, upon reconnection I was automatically logged out of Leantime. And then every time I tried to log back in, I was redirected to the login page. I cleared the cookies from my browser, and tried logging in using other browsers (Edge, Firefox, Chromium), but I had the same problem. I also deleted the files in the /sessions/ directory. Before I found the above solution, the only way to resolve it was to restart the docker images.

Errors from the log

This is what helped me identify the problem:

/var/www/html/logs/error.log

[18-Apr-2024 07:53:38 UTC] PHP Warning:  ini_set(): Session ini settings cannot be changed after headers have already been sent in /var/www/html/app/Core/Session.php on line 62
[18-Apr-2024 07:53:38 UTC] PHP Warning:  ini_set(): Session ini settings cannot be changed after headers have already been sent in /var/www/html/app/Core/Session.php on line 63
[18-Apr-2024 07:53:38 UTC] PHP Warning:  session_name(): Session name cannot be changed after headers have already been sent in /var/www/html/app/Core/Session.php on line 84
[18-Apr-2024 07:53:38 UTC] PHP Warning:  session_id(): Session ID cannot be changed after headers have already been sent in /var/www/html/app/Core/Session.php on line 85
[18-Apr-2024 07:53:38 UTC] PHP Warning:  session_start(): Session cannot be started after headers have already been sent in /var/www/html/app/Core/Session.php on line 86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant