Doc #76413 [Asn->Nab]: session_name() documentation is wrong

From: Date: Wed, 06 Jun 2018 09:28:17 +0000
Subject: Doc #76413 [Asn->Nab]: session_name() documentation is wrong
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-15739@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76413&edit=1

 ID:                 76413
 Updated by:         yohgaki@php.net
 Reported by:        tony at marston-home dot demon dot co dot uk
 Summary:            session_name() documentation is wrong
-Status:             Assigned
+Status:             Not a bug
 Type:               Documentation Problem
 Package:            Session related
 PHP Version:        7.2.6
 Assigned To:        yohgaki
 Block user comment: N
 Private report:     N

 New Comment:

I'm not sure who does the update, but sentence is correct.
Cookie sent checks(session_id() and session_name()) were there for a long time.

Try "php -a", then
echo 1
session_name('new'); // or session_id('new');


Previous Comments:
------------------------------------------------------------------------
[2018-06-05 09:49:51] tony at marston-home dot demon dot co dot uk

Description:
------------
The manual page for session_name() has recently been updated to include the following:

"When new session name is supplied, session_name() modifies HTTP cookie (and output contents
when session.transid is enabled). Once HTTP cookie is sent, session_name() raises error."

I have run several tests, and I cannot see this behaviour, nor has it ever been the behaviour in all
past versions of PHP.

Changing the session name does not create or modify any cookies. Session cookies are only created
with session-start() and modified with session_regenerate_id().

It is also possible to create a cookie before calling session_name('newname') without any
error.



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=76413&edit=1


Thread (8 messages)

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