Repository navigation
Conversation
With dirdepth > 0, GC used stat() to descend, so a symlink in save_path made it delete expired sess_* files in the directory it points to.
iliaal
approved these changes
Nov 24, 2026
| if (PHP_OS_FAMILY === 'Windows') die('skip not for Windows'); | ||
| ?> | ||
| --INI-- | ||
| session.gc_probability=0 |
Member
There was a problem hiding this comment.
Could you pin session.gc_maxlifetime=10 here? At 3600, the 2,000-second-old file survives even if GC follows the symlink.
Contributor
Author
There was a problem hiding this comment.
Done in new commit
| --SKIPIF-- | ||
| <?php | ||
| include(__DIR__ . '/../skipif.inc'); | ||
| if (PHP_OS_FAMILY === 'Windows') die('skip not for Windows'); |
Member
There was a problem hiding this comment.
Could we run this on Windows when the runner can create directory symlinks? The cleanup would need rmdir() for the directory symlink on Windows.
Contributor
Author
There was a problem hiding this comment.
We can, but the skip session is ugly. Would be nice to organize it properly, because skip functio is already present in standard/tests/file/windows_links/common.inc. But I think it's for another PR to clean it up.
arnaud-lb
added a commit
to mihaliak/php-src
that referenced
this pull request
Nov 25, 2026
* PHP-8.6: Fix float literals losing precision in AST export (phpGH-25461) ext/session: don't follow symlinked subdirectories in files GC (phpGH-25671)
arnaud-lb
added a commit
to prateekbhujel/php-src
that referenced
this pull request
Nov 25, 2026
* PHP-8.6: (92 commits) Fix arrow functions not capturing variables in partial application args (php#25732) Fix float literals losing precision in AST export (phpGH-25461) ext/session: don't follow symlinked subdirectories in files GC (phpGH-25671) [skip ci] Skip automatic_worker_limit.phpt on few cores [skip ci] Fix Symfony test without USE_TRACKED_ALLOC [skip ci] Skip assign_dim_undef_op_data_008.phpt when JIT is unavailable ext/intl: Preserve the previous MessageFormatter pattern on failure (php#25642) Fix phpGH-25313: Assertion !EG(exception) in ZEND_FE_FREE when unpacking a generator into a by-ref parameter throws ext/opcache: Fix JIT register allocation for ASSIGN to traced reference Fix phpGH-25650: PDO::query() reports wrong argument numbers for ctor args Fix tracing JIT taking the wrong branch after a VM interrupt (php#25636) [skip ci] Add APP_DEBUG=0 for Symfony Preloading test streams: fix stale readbuflen after stream_filter_remove() on a read filter Update NEWS for phpGH-20920 LibreSSL build fix Fix phpGH-20920: do not use OPENSSL_strndup() for peer CN matching Simplify php_openssl_load_all_certs_from_file() Fix phpGH-20920: only register PKCS7_NO_DUAL_CONTENT when it is defined Fix phpGH-20920: guard ENGINE_cleanup() with OPENSSL_NO_ENGINE again ext/soap: Fix NULL dereference on empty Body with matching SOAPAction (phpGH-25661) ext/dom: Fix use-after-free in getElementById() after removing an ID attribute ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With dirdepth > 0, GC used stat() to descend, so a symlink in save_path made it delete expired sess_* files in the directory it points to.