This repository has been archived by the owner on Nov 26, 2017. It is now read-only.
Change Session None to use PHP session configuration instead of trying to force file mode #1839
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.
Currently, using the set_ini function to force file usage for sessions will only work if PHP is already configured to store sessions in files. If it is configured for a different session storage, such as memcached, the session_path variable points to the session server, not a file path, and thus setting file mode breaks when it tries to save to a file using the session path variable.
My hypothesis is that at one point in time that set_ini was used in JSession in order to change the PHP session handling process and that this set_ini was used to put PHP back into file mode[blindly assuming it was in file mode to begin with].
With the current PHP session handling function registration method, that hypothetical process was replaced and this set_ini call was left lying around by mistake. Since most PHP configurations just use file session handling, this ini call "works" for 95% of sites, but causes problems on the 5% using alternate methods.
I don't see how removing it can cause any problems for the 95% and will fix things for the 5% - as such this fixes Joomla! Session handling for everyone.