Doc #76358 [Com]: Cannot change session name when session is active

From: Date: Wed, 23 May 2018 11:44:14 +0000
Subject: Doc #76358 [Com]: Cannot change session name when session is active
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-15709@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76358&edit=1 ID: 76358 Comment by: notasockpuppet at atotallyrealdomain dot com Reported by: tony at marston-home dot demon dot co dot uk Summary: Cannot change session name when session is active Status: Verified Type: Documentation Problem Package: Session related Operating System: Windows 10 PHP Version: 7.2.5 Block user comment: N Private report: N New Comment: I am HORRIFIED to find that a change was made that was not personally signed off by Toby. I will not be using PHP any more, this is the final straw. I can cope with the weird names and inconsistent APIs and segfaults and projects possessed by demonic forces, but I WILL NOT support a community that does not respect such wise people as Tiny. Previous Comments: ------------------------------------------------------------------------ [2018-05-23 08:27:33] tony at marston-home dot demon dot co dot uk I have checked that discussion, and NOWHERE does it mention a change in behaviour for session_name() that would cause a BC break. This was never identified, discussed, or voted upon, therefore I consider it to be an unauthorised change. Changing the behaviour back to what it originally was, and AS DOCUMENTED for the past 20 years, will not cause any BC breaks, so your "fix" for a problem which did not exist in the first place should be reverted. ------------------------------------------------------------------------ [2018-05-23 06:43:48] a at b dot c dot de >Not all changes to PHP require an RFC. This one was mentioned on the internals list by @yohgaki >in mid October 2016 ("Fixing insane session_start() behaviors") and the discussion lasted >for a couple days without any dissenting opinions offered. During the discussion on the internals list and on github, @yohgaki did mention that he _should_ have written an RFC on the subject, but never got around to doing so. Perhaps he could write one ex post facto to consolidate the whys and wherefores of this change and serve as a future citation reference. ------------------------------------------------------------------------ [2018-05-22 11:42:45] tony at marston-home dot demon dot co dot uk How can reverting code which caused a BC break be a BC in itself? What existing scripts which may have been modified to get around the BC break which you introduced would be broken if the original AND DOCUMENTED behaviour were to be reinstated? If the userland fix to get around this BC break is to insert a call to session_write_close() before the call to session_name() then what harm would it cause? It would just mean that the call to session_write_close() would be redundant. It would certainly not cause an error. ------------------------------------------------------------------------ [2018-05-22 10:13:41] requinix@php.net I'm sorry but since this behavior now exists in PHP 7.2, fixing it would be a BC break and we wouldn't want to make developers in userland have to change their code to deal with our mistake. This should be discussed in the PHP internals group and voted upon. That is what you wanted, right? Due process? Or shall we ignore it this time too? ------------------------------------------------------------------------ [2018-05-22 10:03:39] tony at marston-home dot demon dot co dot uk The fact that session_name() was mentioned in that list of changes in that GitHub page is irrelevant. The precise change, and that it broke BC, was not specified. It was NOT mentioned in any official documentation on the PHP website, and it was NOT mentioned in any change logs. Bug #71038 did not mention any problem with session_name, nor did it indicate that it would be changed. The fact that you think that it is not correct to create a new session name while a current session is active is irrelevant. That is what the function allowed for more than 15 years, and that is what the documentation said it would do. Nowhere does it say that you cannot change the session name if a session is already active. I repeat, this is an undocumented BC break that was never discussed on the php.internals group and was never voted upon, therefore I regard it as an unauthorised change. I do not see why us developers in userland should have to change our code to deal with your mistake. The old behaviour did NOT cause any problems, so I demand that you revert this change immediately. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=76358 -- Edit this bug report at https://bugs.php.net/bug.php?id=76358&edit=1

« previous php.doc.bugs (#15709) next »