User "Tim Starling" posted a comment on MediaWiki.r87235.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/87235#c17439
Commit summary:

Remove the session_write_close() from r72475 since it apparently causes bug 
27891, total breakage of ChronologyProtector. WMF patch only for now, maybe 
Bryan will fix it properly.

Comment:

This seems like a good reason to not use the PHP session extension. I've been 
talking for a while about getting rid of it, it doesn't really provide much 
value for us. If we had an object-oriented view of a session, then you could 
create an object which accessed the uploader's session, without changing the 
definition of $_SESSION.

I'm not really keen about closing all database connections and then reopening 
them just to get some session-related side-effect.

A possible interim solution would be to implement an object-oriented session 
class which is compatible with PHP's session handling system. The object would 
read a given session file directly, unserialize it, provide access to the data 
via get/set methods, then then reserialize it and store it back to the file. 
Obviously if memcached sessions were enabled, it would use memcached as a 
backend instead of files.

Then the next step (maybe done by someone else) would be to use the new class 
for all session access, replacing $_SESSION.

Session files really are just files, and they're required to be writable by the 
web user so there's no problem with writing to them directly. The only tricky 
thing about it is the need to simulate the session-specific serialization 
function. For some reason, the session extension has its own format, and it 
doesn't provide a sensible interface to it. 

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to