Skip to content
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

Merged
merged 1 commit into from Feb 24, 2013

Conversation

ghost
Copy link

@ghost ghost commented Feb 20, 2013

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.

…set to a writable file path - ie PHP is already configured to use file session handling. If it is using Memcached or some other system, the session path is generally the url for the session storage server and will then break if PHP is forced into file mode.

Also modified documentation on JSessionStorageNone so that it specifies that this session mechanism uses the PHP configured session mechanism, which is generally the file method but does not have to be.
@ghost ghost mentioned this pull request Feb 20, 2013
eddieajau added a commit that referenced this pull request Feb 24, 2013
Change Session None to use PHP session configuration instead of trying to force file mode
@eddieajau eddieajau merged commit 15c5fa7 into joomla:staging Feb 24, 2013
mbabker added a commit to joomla/joomla-framework that referenced this pull request Mar 3, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant