session.lazy_write only implemented if user defines custom handler with updateTimestamp method - Incorrect behavior
@devnexen is already working on this.
Since Jul 29, 2024.
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
The following code:
Will not call updateTimestamp unless PS(mod)->s_update_timestamp exists & is different to the inbuilt updateTimestamp function (php_session_update_timestamp defined in https://github.com/php/php-src/blob/21e01f3e70308824169632d5a16047f9df52fac9/ext/session/session.c#L1105). It will always call the standard inbuilt file write handler instead.
Given that session.lazy_write defaults to 1 --> True, the expectation is that the session file will not be overwritten if there isn't a change in session value. But this will always happen unless there is a defined custom handler.
PHP Version
PHP 8.2
Operating System
Ubuntu 22.04 LTS
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.